13
0

Add PortalCommand

Add LobbySystem.properties
Add LobbySystem_en.properties
Dieser Commit ist enthalten in:
yoyosource 2021-10-04 11:46:15 +02:00
Ursprung 4064f28caf
Commit e6eb416e45
4 geänderte Dateien mit 67 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -22,10 +22,13 @@ package de.steamwar.lobby;
import de.steamwar.lobby.listener.Fightservers; import de.steamwar.lobby.listener.Fightservers;
import de.steamwar.lobby.listener.Join; import de.steamwar.lobby.listener.Join;
import de.steamwar.lobby.listener.Portals; import de.steamwar.lobby.listener.Portals;
import de.steamwar.message.Message;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
public class LobbySystem extends JavaPlugin { public class LobbySystem extends JavaPlugin {
// This should be treated as final!
public static Message MESSAGE;
private static LobbySystem plugin; private static LobbySystem plugin;
private static Config config; private static Config config;
@ -36,6 +39,8 @@ public class LobbySystem extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
MESSAGE = new Message("de.steamwar.lobby.LobbySystem", getClassLoader());
new Join(); new Join();
new Fightservers(); new Fightservers();
new Portals(); new Portals();

Datei anzeigen

@ -0,0 +1,9 @@
PREFIX = §eLobby§8System§8»
TIME = HH:mm:ss
DATE=........
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
# Portal Command
PORTAL_COMMAND_LIST_HELP = §8/§7portal §elist §8- §7Listet alle Portale auf
PORTAL_COMMAND_ADD_HELP = §8/§7portal §ecreate §8[§7PortalType§8] §8[§7PortalName§8] §8- §7Fügt ein Portal hinzu
PORTAL_COMMAND_REMOVE_HELP = §8/§7portal §eremove §8[§7PortalName§8] §8- §7Entfernt ein Portal

Datei anzeigen

@ -0,0 +1,53 @@
package de.steamwar.lobby.command;
import de.steamwar.command.SWCommand;
import de.steamwar.lobby.LobbySystem;
import de.steamwar.lobby.listener.Portals;
import de.steamwar.sql.SteamwarUser;
import org.bukkit.entity.Player;
public class PortalCommand extends SWCommand {
protected PortalCommand(String command) {
super("portal");
}
private boolean noPermissions(Player player) {
SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId());
return !steamwarUser.getUserGroup().isTeamGroup();
}
@Register(help = true)
public void genericHelp(Player player, String... args) {
if (noPermissions(player)) return;
LobbySystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "portal");
LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_LIST_HELP", player);
LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_ADD_HELP", player);
LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_REMOVE_HELP", player);
}
@Register("list")
public void portalList(Player player) {
// TODO: implement
}
@Register({"create", "command"})
public void portalAddCommand(Player player, String... command) {
}
@Register({"create", "fightserver"})
public void portalAddFightserver(Player player) {
}
@Register({"create", "teleport"})
public void portalAddTeleport(Player player, String portalName) {
}
@Register("remove")
public void portalRemove(Player player, String portalName) {
}
}