Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Etzelia | fb030fe62e | |
Etzelia | fbf285fb4f | |
Etzelia | 055672468d | |
Etzelia | 6f094c6dd4 |
|
@ -127,9 +127,7 @@ 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());
|
||||
});
|
||||
player.kickPlayer("You have been kicked: " + kick.getReason());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,9 +140,7 @@ 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());
|
||||
});
|
||||
player.kickPlayer("You have been banned: " + ban.getReason());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue