geforkt von Mirrors/Paper
Added new methods to Server, Player and OfflinePlayer for banning and unbanning
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
6d43d89f5e
Commit
93040c71de
@ -240,4 +240,8 @@ public final class Bukkit {
|
|||||||
public static void unbanIP(String address) {
|
public static void unbanIP(String address) {
|
||||||
server.unbanIP(address);
|
server.unbanIP(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<OfflinePlayer> getBannedPlayers() {
|
||||||
|
return server.getBannedPlayers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,18 @@ public interface OfflinePlayer extends ServerOperator {
|
|||||||
* @return Player name
|
* @return Player name
|
||||||
*/
|
*/
|
||||||
public String getName();
|
public String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this player is banned or not
|
||||||
|
*
|
||||||
|
* @return true if banned, otherwise false
|
||||||
|
*/
|
||||||
|
public boolean isBanned();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bans or unbans this player
|
||||||
|
*
|
||||||
|
* @param banned true if banned
|
||||||
|
*/
|
||||||
|
public void setBanned(boolean banned);
|
||||||
}
|
}
|
||||||
|
@ -407,4 +407,11 @@ public interface Server {
|
|||||||
* @param address IP address to unban
|
* @param address IP address to unban
|
||||||
*/
|
*/
|
||||||
public void unbanIP(String address);
|
public void unbanIP(String address);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a set containing all banned players
|
||||||
|
*
|
||||||
|
* @return Set containing banned players
|
||||||
|
*/
|
||||||
|
public Set<OfflinePlayer> getBannedPlayers();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren