Created leave command.

This commit is contained in:
Steffion 2013-08-05 00:02:01 +02:00
parent c83f18da9f
commit 23cddab7a3
4 changed files with 30 additions and 3 deletions

View File

@ -50,6 +50,14 @@ public enum CommandC {
ConfigC.help_join,
1,
W.pluginName + " <join|j> <arenaname>"),
LEAVE ("BlockHunt%leave_",
"BlockHunt%l_",
new CMDleave(),
ConfigC.commandEnabled_leave,
PermsC.leave,
ConfigC.help_leave,
1,
W.pluginName + " <leave|l>"),
WAND ("BlockHunt%wand_",
"BlockHunt%w_",
new CMDwand(),

View File

@ -19,6 +19,7 @@ public enum ConfigC {
commandEnabled_help (true, W.config),
commandEnabled_reload (true, W.config),
commandEnabled_join (true, W.config),
commandEnabled_leave (true, W.config),
commandEnabled_wand (true, W.config),
commandEnabled_create (true, W.config),
commandEnabled_set (true, W.config),
@ -42,6 +43,7 @@ public enum ConfigC {
help_help ("%NShows a list of commands.", W.messages),
help_reload ("%NReloads all configs.", W.messages),
help_join ("%NJoins a " + W.pluginName + " game.", W.messages),
help_leave ("%NLeave a " + W.pluginName + " game.", W.messages),
help_wand ("%NGives you the wand selection tool.", W.messages),
help_create ("%NCreates an arena from your selection.", W.messages),
help_set ("%NOpens a panel to set settings.", W.messages),
@ -56,6 +58,10 @@ public enum ConfigC {
normal_reloadedConfigs ("&aReloaded all configs!", W.messages),
normal_joinJoinedArena ("%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)",
W.messages),
normal_leaveYouLeft ("%NYou left the arena! Thanks for playing ;)!",
W.messages),
normal_leaveLeftArena ("%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)",
W.messages),
normal_wandGaveWand ("%NHere you go ;)! &o(Use the %A&o%type%%N&o!)",
W.messages),
normal_wandSetPosition ("%NSet position %A#%number%%N to location: %pos%.",
@ -64,7 +70,7 @@ public enum ConfigC {
W.messages),
normal_lobbyArenaIsStarting ("%NThe arena will start in %A%1%%N second(s)!",
W.messages),
normal_lobbyArenaStarted ("%NThe arena has been started! The seeker is comming to find you!",
normal_lobbyArenaStarted ("%NThe arena has been started! The seeker is comming to find you in %A%secs%%N second(s)!",
W.messages),
normal_ingameSeekerChoosen ("%NPlayer %A%seeker%%N has been choosen as seeker!",
W.messages),
@ -91,6 +97,7 @@ public enum ConfigC {
error_joinWarpsNotSet ("%EThere are no warps set for this arena. Notify the administrator.",
W.messages),
error_joinArenaIngame ("%EThis game has already started.", W.messages),
error_leaveNotInArena ("%EYou're not in an arena!", W.messages),
error_createSelectionFirst ("%EMake a selection first. Use the wand command: %A/"
+ W.pluginName + " <wand|w>%E.",
W.messages),

View File

@ -19,9 +19,10 @@ public class PlayerM {
info (main + "info", PType.ALL),
help (main + "help", PType.ALL),
reload (main + "reload", PType.MODERATOR),
join (main + "join", PType.PLAYER),
leave (main + "leave", PType.PLAYER),
create (main + "create", PType.ADMIN),
set (main + "set", PType.MODERATOR),
join (main + "join", PType.PLAYER),
setwarp (main + "setwarp", PType.MODERATOR);
public String perm;

View File

@ -4,8 +4,10 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import pgDev.bukkit.DisguiseCraft.api.DisguiseCraftAPI;
import nl.Steffion.BlockHunt.Managers.ConfigM;
@ -32,6 +34,15 @@ public class W {
public static ArrayList<Arena> arenaList = new ArrayList<Arena>();
public static Random random = new Random();
public static DisguiseCraftAPI dcAPI;
public static HashMap<Player, Integer> seekertime = new HashMap<Player, Integer>();
public static HashMap<Player, Location> pLocation = new HashMap<Player, Location>();
public static HashMap<Player, GameMode> pGameMode = new HashMap<Player, GameMode>();
public static HashMap<Player, ItemStack[]> pInventory = new HashMap<Player, ItemStack[]>();
public static HashMap<Player, ItemStack[]> pArmor = new HashMap<Player, ItemStack[]>();
public static HashMap<Player, Float> pEXP = new HashMap<Player, Float>();
public static HashMap<Player, Double> pHealth = new HashMap<Player, Double>();
public static HashMap<Player, Integer> pFood = new HashMap<Player, Integer>();
public static void newFiles() {
ConfigM.setDefaults();