Compare commits

..

4 Commits
master ... mcm

Author SHA1 Message Date
Etzelia fb030fe62e
Chat API
Signed-off-by: Etzelia <etzelia@hotmail.com>
2020-10-31 22:18:36 -05:00
Etzelia fbf285fb4f Add token auth and POST endpoints (#6)
Add token auth and POST endpoints

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.etztech.xyz/Minecraft/ServerAPI/pulls/6
Reviewed-by: ZeroHD <joey@ahines.net>
2020-10-07 01:20:02 +02:00
Etzelia 055672468d Change QueryAPI to PingAPI and add PluginAPI (#4)
typo

Fix null fields

Signed-off-by: Etzelia <etzelia@hotmail.com>

Change QueryAPI to PingAPI and add PluginAPI

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.etztech.xyz/Minecraft/ServerAPI/pulls/4
Reviewed-by: ZeroHD <joey@ahines.net>
2020-08-12 02:43:42 +02:00
Etzelia 6f094c6dd4 Fix conflicting name (#3)
Fix conflicting name

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.etztech.xyz/Minecraft/ServerAPI/pulls/3
2020-08-11 04:04:12 +02:00
1 changed files with 2 additions and 6 deletions

View File

@ -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());
}
}