Dieser Commit ist enthalten in:
Ursprung
93757ff86e
Commit
183248c0b1
@ -39,22 +39,25 @@ public class ArenaCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void arenaJoin(ProxiedPlayer player, ServerInfo server) {
|
public void arenaJoin(ProxiedPlayer player, Subserver server) {
|
||||||
Subserver subserver = Subserver.getSubserver(server);
|
TpCommand.teleport(player, server.getServer());
|
||||||
if(server == null || subserver == null || subserver.getType() != Servertype.ARENA) {
|
|
||||||
ChatSender.of(player).system("ARENA_NOT_FOUND");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TpCommand.teleport(player, server);
|
@ClassMapper(value = ServerInfo.class, local = true)
|
||||||
}
|
public TypeMapper<Subserver> serverInfoTypeMapper() {
|
||||||
|
return new TypeMapper<Subserver>() {
|
||||||
@ClassMapper(ServerInfo.class)
|
|
||||||
public TypeMapper<ServerInfo> serverInfoTypeMapper() {
|
|
||||||
return new TypeMapper<ServerInfo>() {
|
|
||||||
@Override
|
@Override
|
||||||
public ServerInfo map(CommandSender commandSender, String[] previousArguments, String s) {
|
public Subserver map(CommandSender commandSender, String[] previousArguments, String s) {
|
||||||
return ProxyServer.getInstance().getServerInfo(s);
|
return Subserver.getSubserver(ProxyServer.getInstance().getServerInfo(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validate(CommandSender sender, Subserver value, MessageSender messageSender) {
|
||||||
|
if (value == null || value.getType() != Servertype.ARENA) {
|
||||||
|
messageSender.send("ARENA_NOT_FOUND");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren