Quakecraft/src/com/Geekpower14/Quake/Commands/AddLobbyWallCommand.java
Arnaud G. GIBERT 80ad510729 Add LobbyArea in order to restrict ScoreBoard display
Rename AddLobby and RemoveLobby into AddLobbyWall and RemoveLobbyWall command
Add AddLobbyArea and RemoveLobbyArea command
Fix lobby.yml config saving
2021-05-06 01:02:51 +02:00

47 lines
1.1 KiB
Java

package com.Geekpower14.Quake.Commands;
import com.Geekpower14.Quake.Quake;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.entity.Player;
public class AddLobbyWallCommand
implements BasicCommand {
private final Quake _plugin;
public AddLobbyWallCommand(Quake pl) {
_plugin = pl;
}
@Override
public boolean onCommand(Player player, String[] args) {
if (Quake.hasPermission(player, getPermission())) {
_plugin._lobby.addLobbyWall(player);
_plugin._lobby.saveconfig();
} else {
player.sendMessage(_plugin._trad.get("NoPermission"));
}
return true;
}
@Override
public String getPermission() {
return "Quake.lobby";
}
@Override
public String help(Player p) {
if (Quake.hasPermission(p, getPermission())) {
return "/quake addlobbywall - Add a sign wall lobby.";
}
return "";
}
@Override
public List<String> getCompletionList(Player player, String[] args) {
List<String> list = new ArrayList();
return list;
}
}