Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Etzelia | f2a6249af1 |
|
@ -127,7 +127,9 @@ public class ServerAPI extends JavaPlugin implements IProvider {
|
|||
public void kick(BanAPI kick) {
|
||||
Player player = Bukkit.getPlayerExact(kick.getTarget());
|
||||
if (player != null) {
|
||||
getServer().getScheduler().runTask(this, () -> {
|
||||
player.kickPlayer("You have been kicked: " + kick.getReason());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +142,9 @@ public class ServerAPI extends JavaPlugin implements IProvider {
|
|||
Bukkit.getBanList(BanList.Type.NAME).addBan(ban.getTarget(), ban.getReason(), expires, "ServerAPI");
|
||||
Player player = Bukkit.getPlayerExact(ban.getTarget());
|
||||
if (player != null) {
|
||||
getServer().getScheduler().runTask(this, () -> {
|
||||
player.kickPlayer("You have been banned: " + ban.getReason());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue