Sueta

StrikeFollow | The recode | Source Code available

2.1

Follow & AutoWatch Players (Only for StrikePractice)

·Plugin

Description
this plugin is a simple made plugin to Watch or Follow Players when they join a game (Auto) which only works with StrikePractice.

Dependencies
StrikePractice plugins is the only needed plugin!

Usage
how to use Srtrike Follow?
Simply add it to your plugins folder and restart your server

Commands & Perms
/follow <player>
Permission: StrikeFollow.use
Description: follows a specific player

/unfollow
Permission: StrikeFollow.use
Description: unfollows the followed player

Config

Settings:
  #Currently uselss.
  Debug: false

Messages

prefix: '&f[&bFollow&f] '
Follow:
  Usage: '&c/follow <player>'
  Success: '&fStarted following &b<followed>!'
  Fail:
    CurrentlyFollowing: '&fYou are already &cFOLLOWING &fsomeone..'
    Not-Exist: '&fThere is &cNO &fonline player with that name.'
Unfollow:
  Auto: '&fYou have unfollowed &b<unfollowed> &fbecause they &cdisconnected&f.'
  Success: '&fSuccessfully unfollowed <unfollowed>!'
  Fail: '&fYou are &cnot following anyone currently.'
Log:
  Match:
    Start: '&fPlayer &b<followed> &fhas started a match!'
    End: '&fPlayer &b<followed> &fhas ended his current fight'
  Spectate:
    Start: '&fPlayer &b<followed> &fhas started spectating a match!'
    End: '&fPlayer &b<followed> &fhas stopped spectating the match.'
  Party:
    Create: '&fPlayer &b<followed> &fhas created a party!'
    Disband: "&fPlayer &b<followed>&f's party has been &cdisbanded."

PlaceolderAPI Support

%StrikeFollow_isFollowing%
#returns true or false (for sprac tab and scorebaord)
%StrikeFollow_following% 
#returns the current following player (returns NONE if there is no one) [/SIZE]

DeveloperAPI

Developer API

First of all we get an instance of our API class

StrikeFollowAPI api = StrikeFollow.getAPI(); //

Great, now we gotta see what that does

FollowPlayer followPlayer = api.getFollowPlayer(player); //returns the FollowPlayer that we will use in a second;)
followPlayer#isFollowing(); //returns if the player following any player or not
followPlayer#getFollowers(); //returns an ArrayList of the follower Players of that player
followPlayer#getFollowing(); //returns the FollowPlayer of the player that is followed
followPlayer#follow(anotherFollowPlayer); //returns a boolean of true or false if the player is following someone it will return false and won't follow
followPlayer#unfollow(); //unfollow any players that is followed and it's a void method
Events

- FollowEvent

FollowEvent#getFollower(); //Returns the Player who followed another player
FollowEvent#getFollowed(); //Returns the Player who got followed

- UnfollowEvent

UnfollowEvent#getUnfollower(); //Returns the Player who unfollowed another player
UnfollowEvent#getUnfollowed(); //Returns the Player who was followed

Support
Feel free to contact me on Discord
or here on SpigotMC

Similar projects

Plugin →