Fixes code style

This commit is contained in:
Kristian Knarvik 2022-10-12 00:55:32 +02:00
parent 47fb6625dd
commit be6ca823fe
54 changed files with 3419 additions and 3412 deletions

View File

@ -5,30 +5,43 @@ If you want to contribute to BlockHunt you're welcome to do so!
Just code what you would like to see or help with "Accepted" issues.
When commiting use the following symbols:
* + For new features/code.
* - For removed code.
* * For fixes, like bugs.
*
+ For new features/code.
*
- For removed code.
*
* For fixes, like bugs.
* ~ Changed stuff/others.
Thanks for helping!
Read before posting issue
====
So if you have an issue regarding BlockHunt that's fine, just go through this check list before you go writing up new issues that we have to deal with.
So if you have an issue regarding BlockHunt that's fine, just go through this check list before you go writing up new
issues that we have to deal with.
1: Plugins - The plugins that BlockHunt requires are ProtocolLib and LibsDisguise, both of these should be updated and should be tested to see if they are working.
1: Plugins - The plugins that BlockHunt requires are ProtocolLib and LibsDisguise, both of these should be updated and
should be tested to see if they are working.
2: Bugs - Have you found a bug? Make sure it isn't anything else to do with the plugin. If you are reporting a bug after you have updated to a new Bukkit/Spigot version then that is ok because with every new version comes new bugs
2: Bugs - Have you found a bug? Make sure it isn't anything else to do with the plugin. If you are reporting a bug after
you have updated to a new Bukkit/Spigot version then that is ok because with every new version comes new bugs
3: Conflicting plugin - These are the most common issue with BlockHunt, if you have installed a plugin and BlockHunt is giving an error, then remove that plugin and don't go putting issues on that aren't needed.
3: Conflicting plugin - These are the most common issue with BlockHunt, if you have installed a plugin and BlockHunt is
giving an error, then remove that plugin and don't go putting issues on that aren't needed.
4: Ideas - New ideas are needed as always but please don't go spamming us saying "Add MySQL", Add this and that and that. Some things we will add to improve BlockHunt but if we say that were not going to implement an idea into BlockHunt then we won't
4: Ideas - New ideas are needed as always but please don't go spamming us saying "Add MySQL", Add this and that and
that. Some things we will add to improve BlockHunt but if we say that were not going to implement an idea into BlockHunt
then we won't
5: False Reports - Adding false issues to this page will only make our lives more difficult, if your going to troll then do it on someone else's plugin because personally that is the last thing on my mind.
5: False Reports - Adding false issues to this page will only make our lives more difficult, if your going to troll then
do it on someone else's plugin because personally that is the last thing on my mind.
6: Check everything - If you can't PVP in a BlockHunt arena then check every single last setting including your WorldGuard settings and even your server.properties file as that has a true/false check for PVP
6: Check everything - If you can't PVP in a BlockHunt arena then check every single last setting including your
WorldGuard settings and even your server.properties file as that has a true/false check for PVP
7: Check if the issue already exists - Look on Github at all the issues first before you go posting an issue, we are again sick of marking issues as duplicates and then closing them
7: Check if the issue already exists - Look on Github at all the issues first before you go posting an issue, we are
again sick of marking issues as duplicates and then closing them
8: If it truly is an issue, report it and we will deal with it as soon as ;3
@ -36,7 +49,8 @@ NOTE: Bugs will always be fixed first before implementing ideas so please don't
Also please do not message us via Bukkit as it is irritating and we only respond to Plugin Developers
Thank you for reading this. The reason I have wrote this up is because we are sick to the back teeth of issues that don't need to be reported.
Thank you for reading this. The reason I have wrote this up is because we are sick to the back teeth of issues that
don't need to be reported.
Thank you,

View File

@ -1,9 +1,12 @@
BlockHunt
====
# ![Thanks to ColeRule for making this awesome banner!](http://g2f.nl/0qheg35 "Thanks to ColeRule for making this awesome banner!")
## Introduction
Hide and seek is a popular game mode on Minecraft that allows you to hide as blocks and disguise as normal props from seekers. This plugin allows you to do that but with a lot more features added on such as: shops, stats etc...
Hide and seek is a popular game mode on Minecraft that allows you to hide as blocks and disguise as normal props from
seekers. This plugin allows you to do that but with a lot more features added on such as: shops, stats etc...
This plugin has been heavily inspired from the gamemode "PropHunt", from the game, "Garry's Mod".
@ -13,7 +16,8 @@ This plugin has been heavily inspired from the gamemode "PropHunt", from the gam
| Branch | Plugin version | Compatiable Minecraft version | Build status | Download |
| --- | --- | --- | --- | --- |
| Release| **v0.2.1** | **v1.12.2** | [![Build Status](https://jenkins.addstar.com.au/job/Blockhunt/badge/icon)] | [DOWNLOAD](https://jenkins.addstar.com.au/job/Blockhunt/lastSuccessfulBuild/artifact/target/) |
| Release| **v0.2.1** | **
v1.12.2** | [![Build Status](https://jenkins.addstar.com.au/job/Blockhunt/badge/icon)] | [DOWNLOAD](https://jenkins.addstar.com.au/job/Blockhunt/lastSuccessfulBuild/artifact/target/) |
#### This plugin requires you to download and install two addinonal plugins! ([Lib's Disguises](https://www.spigotmc.org/resources/libs-disguises.81/) and [ProtocolLib](http://dev.bukkit.org/bukkit-plugins/protocollib/))
@ -24,6 +28,7 @@ This plugin has been heavily inspired from the gamemode "PropHunt", from the gam
| **Issues/Tickets on GitHub** | [Click Here](https://github.com/AddstarMC/BlockHunt/issues/) |
### Features
* Custom wand for selection arena.
* Multiple arenas.
* **Join/Leave signs!**
@ -37,45 +42,42 @@ This plugin has been heavily inspired from the gamemode "PropHunt", from the gam
* **_And more!_**
## Commands & Permissions
_**Note:** Instead of using /BlockHunt you could use:_
* /bh
* /hideandseek
* /seekandfind (from my old plugin)
<> = Required [] = Optional
|Command|Description|Permission||
|:--|:--|:--|:--|
|`/BlockHunt [info/i]`|Displays the plugin's info.|blockhunt.info|_All players have this permission from default._|
|`/BlockHunt <help/h>`|Shows a list of commands.|blockhunt.help|_All players have this permission from default._|
|`/BlockHunt <reload/r>`|Reloads all configs.|blockhunt.reload|blockhunt.admin|
|`/BlockHunt <join/j> <arenaname>`|Joins a BlockHunt game.|blockhunt.join|blockhunt.player|
|`/BlockHunt <leave/l>`|Leave a BlockHunt game.|blockhunt.leave|blockhunt.player|
|`/BlockHunt <list/li>`|Shows a list of available arenas.|blockhunt.list|blockhunt.player|
|`/BlockHunt <shop/sh>`|Opens the BlockHunt shop.|blockhunt.shop|blockhunt.player|
|`/BlockHunt <start/go> <arenaname>`|Forces an arena to start.|blockhunt.start|blockhunt.moderator|
|`/BlockHunt <wand/w>`|Gives you the wand selection tool.|blockhunt.create|blockhunt.admin|
|`/BlockHunt <create/c> <arenaname>`|Creates an arena from your selection.|blockhunt.create|blockhunt.admin|
|`/BlockHunt <set/s> <arenaname>`|Opens a panel to set settings.|blockhunt.set|blockhunt.moderator|
|`/BlockHunt <setwarp/sw> <lobby/hiders/seekers/spawn> <arenaname>`|Sets warps for your arena.|blockhunt.setwarp|blockhunt.moderator|
|`/BlockHunt <remove/delete> <arenaname>`|Deletes an Arena.|blockhunt.remove|blockhunt.admin|
|`/BlockHunt <tokens/t> <set/add/take> <playername> <amount>`|Change someones tokens.|blockhunt.tokens|blockhunt.admin|
||Able to join full games.|blockhunt.joinfull|blockhunt.moderator|
||Able to join/leave using join/leave signs.|blockhunt.joinsign|blockhunt.player|
||Able to create a join/leave sign.|blockhunt.signcreate|blockhunt.moderator|
||Gives you the BlockChooser.|blockhunt.shop.blockchooser|blockhunt.admin|
||Gives you the ability to do all commands in-game.|blockhunt.allcommands|Operators|
|Command|Description|Permission|| |:--|:--|:--|:--| |`/BlockHunt [info/i]`|Displays the plugin's info.|blockhunt.info|_
All players have this permission from default._| |`/BlockHunt <help/h>`|Shows a list of commands.|blockhunt.help|_All
players have this permission from default._| |`/BlockHunt <reload/r>`|Reloads all
configs.|blockhunt.reload|blockhunt.admin| |`/BlockHunt <join/j> <arenaname>`|Joins a BlockHunt
game.|blockhunt.join|blockhunt.player| |`/BlockHunt <leave/l>`|Leave a BlockHunt game.|blockhunt.leave|blockhunt.player|
|`/BlockHunt <list/li>`|Shows a list of available arenas.|blockhunt.list|blockhunt.player| |`/BlockHunt <shop/sh>`|Opens
the BlockHunt shop.|blockhunt.shop|blockhunt.player| |`/BlockHunt <start/go> <arenaname>`|Forces an arena to
start.|blockhunt.start|blockhunt.moderator| |`/BlockHunt <wand/w>`|Gives you the wand selection
tool.|blockhunt.create|blockhunt.admin| |`/BlockHunt <create/c> <arenaname>`|Creates an arena from your
selection.|blockhunt.create|blockhunt.admin| |`/BlockHunt <set/s> <arenaname>`|Opens a panel to set
settings.|blockhunt.set|blockhunt.moderator| |`/BlockHunt <setwarp/sw> <lobby/hiders/seekers/spawn> <arenaname>`|Sets
warps for your arena.|blockhunt.setwarp|blockhunt.moderator| |`/BlockHunt <remove/delete> <arenaname>`|Deletes an
Arena.|blockhunt.remove|blockhunt.admin| |`/BlockHunt <tokens/t> <set/add/take> <playername> <amount>`|Change someones
tokens.|blockhunt.tokens|blockhunt.admin| ||Able to join full games.|blockhunt.joinfull|blockhunt.moderator| ||Able to
join/leave using join/leave signs.|blockhunt.joinsign|blockhunt.player| ||Able to create a join/leave
sign.|blockhunt.signcreate|blockhunt.moderator| ||Gives you the
BlockChooser.|blockhunt.shop.blockchooser|blockhunt.admin| ||Gives you the ability to do all commands
in-game.|blockhunt.allcommands|Operators|
### Other special permissions
|Permission|Description|
|:--|:--|
|`blockhunt.*`|All BlockHunt permissions.|
|`blockhunt.player`|All player related permissions.|
|`blockhunt.moderator`|All moderator related permissions.|
|`blockhunt.admin`|All admin related permissions.|
|`*`|All permissions on your server, including BlockHunt's permissions.|
|Permission|Description| |:--|:--| |`blockhunt.*`|All BlockHunt permissions.| |`blockhunt.player`|All player related
permissions.| |`blockhunt.moderator`|All moderator related permissions.| |`blockhunt.admin`|All admin related
permissions.| |`*`|All permissions on your server, including BlockHunt's permissions.|
## How to set-up?
Use this video to manage your way through the set-up phase!
<a href="http://www.youtube.com/watch?feature=player_embedded&v=msPQ1UMiHWg

View File

@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nl.Steffion</groupId>
<artifactId>BlockHunt</artifactId>

View File

@ -1,10 +1,5 @@
package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
@ -13,11 +8,16 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scoreboard.Scoreboard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@SerializableAs("BlockHuntArena")
public class Arena implements ConfigurationSerializable {
public String arenaName;
public Location pos1;
public Location pos2;
public final String arenaName;
public final Location pos1;
public final Location pos2;
public int maxPlayers;
public int minPlayers;
public int amountSeekersOnStart;
@ -26,28 +26,28 @@ public class Arena implements ConfigurationSerializable {
public int gameTime;
public int timeUntilHidersSword;
public int blockAnnouncerTime;
public boolean seekersCanHurtSeekers;
public boolean hidersCanHurtSeekers;
public boolean hidersCanHurtHiders;
public boolean seekersTakeFallDamage;
public boolean hidersTakeFallDamage;
public final boolean seekersCanHurtSeekers;
public final boolean hidersCanHurtSeekers;
public final boolean hidersCanHurtHiders;
public final boolean seekersTakeFallDamage;
public final boolean hidersTakeFallDamage;
public ArrayList<ItemStack> disguiseBlocks;
public Location lobbyWarp;
public Location hidersWarp;
public Location seekersWarp;
public Location spawnWarp;
public List<String> seekersWinCommands;
public List<String> hidersWinCommands;
public List<String> allowedCommands;
public final List<String> seekersWinCommands;
public final List<String> hidersWinCommands;
public final List<String> allowedCommands;
public int seekersTokenWin;
public int hidersTokenWin;
public int killTokens;
public List<Player> playersInArena;
public final List<Player> playersInArena;
public ArenaState gameState;
public int timer;
public List<Player> seekers;
public Scoreboard scoreboard;
public final List<Player> seekers;
public final Scoreboard scoreboard;
public Arena(String arenaName, Location pos1, Location pos2, int maxPlayers, int minPlayers, int amountSeekersOnStart,
int timeInLobbyUntilStart, int waitingTimeSeeker, int gameTime, int timeUntilHidersSword, int blockAnnouncerTime,

View File

@ -1,18 +1,18 @@
package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import java.util.List;
import me.libraryaddict.disguise.DisguiseAPI;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Events.EndArenaEvent;
import nl.Steffion.BlockHunt.Events.JoinArenaEvent;
import nl.Steffion.BlockHunt.Events.LeaveArenaEvent;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import org.bukkit.*;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
@ -20,6 +20,9 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect;
import java.util.ArrayList;
import java.util.List;
public class ArenaHandler {
public static void loadArenas() {
MemoryStorage.arenaList.clear();
@ -135,15 +138,17 @@ public class ArenaHandler {
// Fix for client not showing players after
// they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player))
if (otherplayer.canSee(player)) {
otherplayer.showPlayer(BlockHunt.plugin, player); // Make
}
// new
// player
// visible
// to
// others
if (player.canSee(otherplayer))
if (player.canSee(otherplayer)) {
player.showPlayer(BlockHunt.plugin, otherplayer); // Make
}
// other
// players
// visible
@ -279,11 +284,13 @@ public class ArenaHandler {
// Fix for client not showing players after they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player))
if (otherplayer.canSee(player)) {
otherplayer.showPlayer(BlockHunt.plugin, player); // Make new player
}
// visible to others
if (player.canSee(otherplayer))
if (player.canSee(otherplayer)) {
player.showPlayer(BlockHunt.plugin, otherplayer); // Make other
}
// players visible
// to new player
}

View File

@ -1,14 +1,10 @@
package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import java.util.List;
import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Listeners.*;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.Commands.CMDTokens;
import nl.Steffion.BlockHunt.Commands.CMDcreate;
import nl.Steffion.BlockHunt.Commands.CMDhelp;
import nl.Steffion.BlockHunt.Commands.CMDinfo;
@ -22,13 +18,26 @@ import nl.Steffion.BlockHunt.Commands.CMDset;
import nl.Steffion.BlockHunt.Commands.CMDsetwarp;
import nl.Steffion.BlockHunt.Commands.CMDshop;
import nl.Steffion.BlockHunt.Commands.CMDstart;
import nl.Steffion.BlockHunt.Commands.CMDtokens;
import nl.Steffion.BlockHunt.Commands.CMDwand;
import nl.Steffion.BlockHunt.Listeners.OnBlockBreakEvent;
import nl.Steffion.BlockHunt.Listeners.OnBlockPlaceEvent;
import nl.Steffion.BlockHunt.Listeners.OnEntityDamageByEntityEvent;
import nl.Steffion.BlockHunt.Listeners.OnEntityDamageEvent;
import nl.Steffion.BlockHunt.Listeners.OnFoodLevelChangeEvent;
import nl.Steffion.BlockHunt.Listeners.OnInventoryClickEvent;
import nl.Steffion.BlockHunt.Listeners.OnInventoryCloseEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerDropItemEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerInteractEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerMoveEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerQuitEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerSwapHandItemsEvent;
import nl.Steffion.BlockHunt.Listeners.OnPlayerTeleportEvent;
import nl.Steffion.BlockHunt.Listeners.OnSignChangeEvent;
import nl.Steffion.BlockHunt.Managers.CommandManager;
import nl.Steffion.BlockHunt.Managers.ConfigManager;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.WordUtils;
import org.bukkit.Bukkit;
@ -48,14 +57,17 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.ArrayList;
import java.util.List;
public class BlockHunt extends JavaPlugin implements Listener {
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
@ -65,7 +77,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
public static BlockHunt plugin;
@SuppressWarnings("serial")
public static List<String> BlockHuntCMD = new ArrayList<String>() {
public static final List<String> BlockHuntCMD = new ArrayList<String>() {
{
add("info");
add("help");
@ -112,10 +124,6 @@ public class BlockHunt extends JavaPlugin implements Listener {
getServer().getPluginManager().registerEvents(new OnInventoryCloseEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerSwapHandItemsEvent(), this);
// Removed - This is handled by WorldGuard now.
// getServer().getPluginManager().registerEvents(
// new OnPlayerCommandPreprocessEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerDropItemEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerInteractEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerMoveEvent(), this);
@ -160,7 +168,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
CMDremove = new CommandManager("BlockHunt REMOVE", "BlockHunt", "remove", "delete", Permissions.remove, ConfigC.help_remove,
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_remove), BlockHuntCMD, new CMDremove(), "/BlockHunt <remove|delete> <arenaname>");
CMDtokens = new CommandManager("BlockHunt TOKENS", "BlockHunt", "tokens", "t", Permissions.tokens, ConfigC.help_tokens,
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_tokens), BlockHuntCMD, new CMDtokens(), "/BlockHunt <tokens|t> <set|add|take> <playername> <amount>");
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_tokens), BlockHuntCMD, new CMDTokens(), "/BlockHunt <tokens|t> <set|add|take> <playername> <amount>");
if (!getServer().getPluginManager().isPluginEnabled("LibsDisguises")) {
MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled);
@ -457,11 +465,8 @@ public class BlockHunt extends JavaPlugin implements Listener {
/**
* Args to String. Makes 1 string.
*
* @param input
* String list which should be converted to a string.
* @param startArg
* Start on this length.
*
* @param input String list which should be converted to a string.
* @param startArg Start on this length.
* @return The converted string.
*/
public static String stringBuilder(String[] input, int startArg) {
@ -512,7 +517,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
if (equals) {
if (PermissionsManager.hasPerm(player, command.permission, true)) {
if (command.enabled) {
command.CMD.execute(player, cmd, label, args);
return command.CMD.execute(player, cmd, label, args);
} else {
MessageManager.sendFMessage(player, ConfigC.error_commandNotEnabled);
}
@ -543,10 +548,8 @@ public class BlockHunt extends JavaPlugin implements Listener {
/**
* Short a String for like the Scoreboard title.
*
* @param string
* String to be shorten.
* @param maxLenght
* Max lenght of the characters.
* @param string String to be shorten.
* @param maxLenght Max lenght of the characters.
* @return Shorten string, else normal string.
*/
public static String cutString(String string, int maxLenght) {

View File

@ -0,0 +1,79 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
public class CMDTokens extends DefaultCMD {
@Override
public boolean execute(Player player, Command cmd, String label, String[] args) {
if (args.length <= 3) {
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDtokens.usage);
} else {
String option = args[1];
String playerName = args[2];
int amount;
try {
amount = Integer.parseInt(args[3]);
} catch (NumberFormatException e) {
MessageManager.sendFMessage(player, ConfigC.error_notANumber, "1-" + args[3]);
return true;
}
Player tokenPlayer = Bukkit.getPlayer(playerName);
if (tokenPlayer == null) {
MessageManager.sendFMessage(player, ConfigC.error_tokensPlayerNotOnline, "playername-" + playerName);
return true;
}
String name = "\u00A78Console";
if (player != null) {
name = player.getName();
}
if (option.equalsIgnoreCase("set")) {
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Set", "playername-" + tokenPlayer.getName(), "option2-to", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-set", "playername-" + name, "option2-to", "amount-" + amount);
} else if (option.equalsIgnoreCase("add")) {
int tokens = 0;
if (MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
tokens = MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens");
}
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", tokens + amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Added", "playername-" + tokenPlayer.getName(), "option2-to", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-added", "playername-" + name, "option2-to", "amount-" + amount);
} else if (option.equalsIgnoreCase("take")) {
int tokens = 0;
if (MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
tokens = MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens");
}
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", tokens - amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Took", "playername-" + tokenPlayer.getName(), "option2-from", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-took", "playername-" + name, "option2-from", "amount-" + amount);
} else {
MessageManager.sendFMessage(player, ConfigC.error_tokensUnknownsetting, "option-" + option);
}
}
return true;
}
}

View File

@ -1,16 +1,18 @@
package nl.Steffion.BlockHunt.Commands;
import java.util.ArrayList;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.ScoreboardHandler;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
import java.util.ArrayList;
public class CMDcreate extends DefaultCMD {
@Override

View File

@ -1,22 +1,22 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.CommandManager;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
@ -32,13 +32,13 @@ public class CMDhelp extends DefaultCMD {
}
}
int maxPages = Math.round(amountCommands / 3);
int maxPages = (int) Math.round(amountCommands / 3.0);
if (maxPages <= 0) {
maxPages = 1;
}
if (args.length == 1) {
int page = 1;
if (args.length == 1) {
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-" + BlockHunt.pdfFile.getName() + " %Nhelp page %A" + page + "%N/%A" + maxPages);
int i = 1;
for (CommandManager command : MemoryStorage.commands) {
@ -54,13 +54,10 @@ public class CMDhelp extends DefaultCMD {
}
}
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-&oHelp Page");
} else {
int page = 1;
try {
page = Integer.valueOf(args[1]);
} catch (NumberFormatException e) {
page = 1;
page = Integer.parseInt(args[1]);
} catch (NumberFormatException ignored) {
}
if (maxPages < page) {
@ -84,8 +81,8 @@ public class CMDhelp extends DefaultCMD {
}
}
}
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-&oHelp Page");
}
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-&oHelp Page");
return true;
}
}

View File

@ -1,19 +1,19 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -4,7 +4,6 @@ import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -3,7 +3,6 @@ package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -3,9 +3,8 @@ package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -1,18 +1,18 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -1,22 +1,22 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.ConfigManager;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -3,9 +3,8 @@ package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;

View File

@ -4,7 +4,6 @@ import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.InventoryHandler;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -1,9 +1,11 @@
package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -1,7 +1,6 @@
package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.InventoryHandler;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -4,9 +4,8 @@ import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;

View File

@ -1,79 +0,0 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
public class CMDtokens extends DefaultCMD {
@Override
public boolean execute(Player player, Command cmd, String label, String[] args) {
if (args.length <= 3) {
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDtokens.usage);
} else {
String option = args[1];
String playerName = args[2];
int amount = 0;
try {
amount = Integer.valueOf(args[3]);
} catch (NumberFormatException e) {
MessageManager.sendFMessage(player, ConfigC.error_notANumber, "1-" + args[3]);
return true;
}
Player tokenPlayer = Bukkit.getPlayer(playerName);
if (tokenPlayer == null) {
MessageManager.sendFMessage(player, ConfigC.error_tokensPlayerNotOnline, "playername-" + playerName);
return true;
}
String name = "\u00A78Console";
if (player != null) {
name = player.getName();
}
if (option.equalsIgnoreCase("set")) {
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Set", "playername-" + tokenPlayer.getName(), "option2-to", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-set", "playername-" + name, "option2-to", "amount-" + amount);
} else if (option.equalsIgnoreCase("add")) {
int tokens = 0;
if (MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
tokens = MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens");
}
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", tokens + amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Added", "playername-" + tokenPlayer.getName(), "option2-to", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-added", "playername-" + name, "option2-to", "amount-" + amount);
} else if (option.equalsIgnoreCase("take")) {
int tokens = 0;
if (MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens") != 0) {
tokens = MemoryStorage.shop.getFile().getInt(tokenPlayer.getName() + ".tokens");
}
MemoryStorage.shop.getFile().set(tokenPlayer.getName() + ".tokens", tokens - amount);
MemoryStorage.shop.save();
MessageManager.sendFMessage(player, ConfigC.normal_tokensChanged, "option-Took", "playername-" + tokenPlayer.getName(), "option2-from", "amount-" + amount);
MessageManager.sendFMessage(tokenPlayer, ConfigC.normal_tokensChangedPerson, "option-took", "playername-" + name, "option2-from", "amount-" + amount);
} else {
MessageManager.sendFMessage(player, ConfigC.error_tokensUnknownsetting, "option-" + option);
}
}
return true;
}
}

View File

@ -1,12 +1,8 @@
package nl.Steffion.BlockHunt.Commands;
import java.util.ArrayList;
import java.util.List;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.command.Command;
@ -14,6 +10,9 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.ArrayList;
import java.util.List;
public class CMDwand extends DefaultCMD {
@Override

View File

@ -1,11 +1,11 @@
package nl.Steffion.BlockHunt.Commands;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
@ -16,6 +16,6 @@ import org.bukkit.entity.Player;
public abstract class DefaultCMD {
public abstract boolean execute(Player player, Command cmd, String label, String[] args);
}

View File

@ -1,15 +1,16 @@
package nl.Steffion.BlockHunt;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.Managers.ConfigManager;
public enum ConfigC {
@ -107,9 +108,9 @@ public enum ConfigC {
error_teleportFailed("%TAG%EUnable to teleport you into the arena.", MemoryStorage.messages),
error_teleportBlocked("%TAG%EYou cannot teleport while playing!", MemoryStorage.messages);
public Object value;
public ConfigManager config;
public String location;
public final Object value;
public final ConfigManager config;
public final String location;
/**
* Makes an object from the list above.

View File

@ -1,13 +1,9 @@
package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import java.util.List;
import nl.Steffion.BlockHunt.Arena.ArenaType;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -15,6 +11,9 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.ArrayList;
import java.util.List;
public class InventoryHandler {
public static void openPanel(Player player, String arenaname) {
@ -29,8 +28,9 @@ public class InventoryHandler {
if (arena != null) {
String shorten = arena.arenaName;
arenaname = arena.arenaName;
if (shorten.length() > 6)
if (shorten.length() > 6) {
shorten = shorten.substring(0, 6);
}
Inventory panel = Bukkit.createInventory(null, 54, MessageManager.replaceAll("\u00A7r%N&lBlockHunt Arena: %A" + shorten));
ItemStack arenaNameNote = new ItemStack(Material.PAPER, 1);

View File

@ -14,7 +14,9 @@ public class OnBlockBreakEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onBlockBreakEvent(BlockBreakEvent event) {
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Player player = event.getPlayer();
for (Arena arena : MemoryStorage.arenaList) {

View File

@ -3,7 +3,6 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -15,7 +14,9 @@ public class OnBlockPlaceEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onBlockPlaceEvent(BlockPlaceEvent event) {
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Player player = event.getPlayer();
for (Arena arena : MemoryStorage.arenaList) {

View File

@ -1,14 +1,14 @@
package nl.Steffion.BlockHunt.Listeners;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import me.libraryaddict.disguise.DisguiseAPI;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.PlayerHandler;
import org.apache.commons.lang.StringUtils;
import org.bukkit.GameMode;
import org.bukkit.Sound;
@ -21,6 +21,10 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.projectiles.ProjectileSource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class OnEntityDamageByEntityEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
@ -31,7 +35,9 @@ public class OnEntityDamageByEntityEvent implements Listener {
}
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Player player = (Player) event.getEntity();
Player damager = null;
@ -153,12 +159,14 @@ public class OnEntityDamageByEntityEvent implements Listener {
// Fix for client not showing players after they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player))
if (otherplayer.canSee(player)) {
otherplayer.showPlayer(BlockHunt.plugin, player); // Make new player visible to others
if (player.canSee(otherplayer))
}
if (player.canSee(otherplayer)) {
player.showPlayer(BlockHunt.plugin, otherplayer); // Make other players visible to new player
}
}
}
});
}
}

View File

@ -3,7 +3,6 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -17,7 +16,9 @@ public class OnEntityDamageEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onEntityDamageEvent(EntityDamageEvent event) {
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Entity ent = event.getEntity();
if (ent instanceof Player) {

View File

@ -2,7 +2,6 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -1,10 +1,12 @@
package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaType;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.InventoryHandler;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.apache.commons.lang.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@ -47,8 +49,9 @@ public class OnInventoryClickEvent implements Listener {
}
// Early exit if this isnt a blockhunt inventory
if (!invView.getTitle().contains("BlockHunt"))
if (!invView.getTitle().contains("BlockHunt")) {
return;
}
if (invView.getTitle().startsWith("\u00A7r")) {
if (invView.getTitle().equals(MessageManager.replaceAll("\u00A7r" + MemoryStorage.config.get(ConfigC.shop_title)))) {
@ -59,12 +62,15 @@ public class OnInventoryClickEvent implements Listener {
MemoryStorage.shop.save();
}
int playerTokens = MemoryStorage.shop.getFile().getInt(player.getName() + ".tokens");
if (item == null)
if (item == null) {
return;
if (item.getType().equals(Material.AIR))
}
if (item.getType().equals(Material.AIR)) {
return;
if (item.getItemMeta().getDisplayName() == null)
}
if (item.getItemMeta().getDisplayName() == null) {
return;
}
if (item.getItemMeta().getDisplayName().equals(MessageManager.replaceAll(MemoryStorage.config.get(ConfigC.shop_blockChooserv1Name).toString()))) {
if (playerTokens >= (Integer) MemoryStorage.config.get(ConfigC.shop_blockChooserv1Price)) {
MemoryStorage.shop.getFile().set(player.getName() + ".blockchooser", true);
@ -182,12 +188,15 @@ public class OnInventoryClickEvent implements Listener {
}
}
if (item == null)
if (item == null) {
return;
if (item.getType().equals(Material.AIR))
}
if (item.getType().equals(Material.AIR)) {
return;
if (!item.getItemMeta().hasDisplayName())
}
if (!item.getItemMeta().hasDisplayName()) {
return;
}
if (item.getType().equals(Material.GOLD_NUGGET)) {
if (item.getItemMeta().getDisplayName().contains("maxPlayers")) {
updownButton(player, item, arena, ArenaType.maxPlayers, arena.maxPlayers, Bukkit.getMaxPlayers(), 2, 1, 1);

View File

@ -1,12 +1,9 @@
package nl.Steffion.BlockHunt.Listeners;
import java.util.ArrayList;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -17,6 +14,8 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
public class OnInventoryCloseEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)

View File

@ -2,7 +2,6 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -1,12 +1,16 @@
package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.InventoryHandler;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.SignsHandler;
import nl.Steffion.BlockHunt.SolidBlockHandler;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;

View File

@ -1,8 +1,11 @@
package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.PlayerHandler;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Sound;
@ -17,7 +20,9 @@ public class OnPlayerMoveEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerMoveEvent(PlayerMoveEvent event) {
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Player player = event.getPlayer();
for (Arena arena : MemoryStorage.arenaList) {
if (arena.playersInArena.contains(player)) {

View File

@ -3,12 +3,10 @@ package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class OnPlayerQuitEvent implements Listener {
@ -24,9 +22,4 @@ public class OnPlayerQuitEvent implements Listener {
}
}
// @EventHandler(priority = EventPriority.HIGHEST)
// public void onPlayerJoinEvent(PlayerJoinEvent event) {
// Player playerJoining = event.getPlayer();
// playerJoining.teleport(playerJoining.getWorld().getSpawnLocation());
// }
}

View File

@ -13,7 +13,9 @@ public class OnPlayerSwapHandItemsEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerSwapHandItemsEvent(PlayerSwapHandItemsEvent event) {
// Early exit if no one is in any arena
if (ArenaHandler.noPlayersInArenas()) return;
if (ArenaHandler.noPlayersInArenas()) {
return;
}
Player player = event.getPlayer();
for (Arena arena : MemoryStorage.arenaList) {

View File

@ -22,6 +22,7 @@ public class OnPlayerTeleportEvent implements Listener {
/**
* Handle a player that is in an arena
*
* @param event PlayerTeleportEvent
* @param player Player
*/

View File

@ -1,10 +1,9 @@
package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.SignsHandler;
import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -1,35 +1,36 @@
package nl.Steffion.BlockHunt.Managers;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import java.util.List;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Commands.DefaultCMD;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import java.util.List;
public class CommandManager {
public String name;
public String label;
public String args;
public String argsalias;
public Permissions permission;
public ConfigC help;
public boolean enabled;
public List<String> mainTABlist;
public DefaultCMD CMD;
public String usage;
public final String name;
public final String label;
public final String args;
public final String argsalias;
public final Permissions permission;
public final ConfigC help;
public final boolean enabled;
public final List<String> mainTABlist;
public final DefaultCMD CMD;
public final String usage;
public CommandManager(String name, String label, String args, String argsalias, Permissions permission, ConfigC help, Boolean enabled, List<String> mainTABlist,
DefaultCMD CMD, String usage) {

View File

@ -1,33 +1,33 @@
package nl.Steffion.BlockHunt.Managers;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import java.io.File;
import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
public class ConfigManager {
private String fileName;
private File file;
private FileConfiguration fileC;
private ConfigurationSection fileCS;
private File fileLocation;
private final String fileName;
private final File file;
private final FileConfiguration fileC;
private final ConfigurationSection fileCS;
private final File fileLocation;
/**
* Use this class to create an automated config file.

View File

@ -2,7 +2,6 @@ package nl.Steffion.BlockHunt.Managers;
import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -23,12 +22,9 @@ public class MessageManager {
* Send a message to a player. Also replaces the "%player%" variable to the
* player's name.
*
* @param player
* The player receiving the message.
* @param message
* Message which needs to be send to the player.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* @param player The player receiving the message.
* @param message Message which needs to be send to the player.
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
* player.getName();
*/
public static void sendMessage(Player player, String message, String... vars) {
@ -43,12 +39,9 @@ public class MessageManager {
* Send a message to a player from a Config. Also replaces the "%player%"
* variable to the player's name.
*
* @param player
* The player receiving the message.
* @param location
* Location in the config of the message being send.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* @param player The player receiving the message.
* @param location Location in the config of the message being send.
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
* player.getName();
*/
public static void sendFMessage(Player player, ConfigC location, String... vars) {
@ -64,19 +57,14 @@ public class MessageManager {
* Send a message to all players online. Also replaces the "%player%"
* variable to the player's name.
*
* @param message
* Message which needs to be send to the player.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* @param message Message which needs to be send to the player.
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
* player.getName();
*/
public static void broadcastMessage(String message, String... vars) {
for (Player player : Bukkit.getOnlinePlayers()) {
// String pMessage = message.replaceAll("%player%",
// player.getName());
player.sendMessage(MessageManager.replaceAll(message.replaceAll("%player%", player.getDisplayName()), vars));
}
// message = message.replaceAll("%player%", "Console");
Bukkit.getConsoleSender().sendMessage(MessageManager.replaceAll(message.replaceAll("%player%", "Console"), vars));
}
@ -84,31 +72,25 @@ public class MessageManager {
* Send a message to all players online from a Config. Also replaces the
* "%player%" variable to the player's name.
*
* @param location
* Location in the config of the message being send.
* @param vars
* Variables . Seperated with a - . Ex: "playerName-" +
* @param location Location in the config of the message being send.
* @param vars Variables . Seperated with a - . Ex: "playerName-" +
* player.getName();
*/
public static void broadcastFMessage(ConfigC location, String... vars) {
for (Player player : Bukkit.getOnlinePlayers()) {
// String pMessage =
// location.config.getFile().get(location.location)
// .toString().replaceAll("%player%", player.getName());
player.sendMessage(MessageManager.replaceAll(location.config.getFile().get(location.location).toString().replaceAll("%player%", player.getDisplayName()), vars));
player.sendMessage(MessageManager.replaceAll(location.config.getFile().get(
location.location).toString().replaceAll("%player%", player.getDisplayName()), vars));
}
// String message = location.config.getFile().get(location.location)
// .toString().replaceAll("%player%", "Console");
Bukkit.getConsoleSender().sendMessage(MessageManager.replaceAll(location.config.getFile().get(location.location).toString().replaceAll("%player%", "Console"), vars));
Bukkit.getConsoleSender().sendMessage(MessageManager.replaceAll(location.config.getFile().get(
location.location).toString().replaceAll("%player%", "Console"), vars));
}
/**
* Replace all variables.
*
* @param message
* Message which needs to be replaced.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* @param message Message which needs to be replaced.
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
* player.getName();
* @return String with the message with values replaced
*/
@ -119,8 +101,7 @@ public class MessageManager {
/**
* Replace default Minecraft colour codes.
*
* @param message
* Message which needs to be replaced.
* @param message Message which needs to be replaced.
* @return Colour replaced message.
*/
public static String replaceColours(String message) {
@ -130,8 +111,7 @@ public class MessageManager {
/**
* Replace colour codes of this plugin.
*
* @param message
* Message which needs to be replaced.
* @param message Message which needs to be replaced.
* @return Colour replaced message.
*/
public static String replaceColourVars(String message) {
@ -147,10 +127,8 @@ public class MessageManager {
/**
* Replace custom variables.
*
* @param message
* Message which needs to be replaced.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* @param message Message which needs to be replaced.
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
* player.getName();
* @return Replaced String.
*/

View File

@ -4,7 +4,6 @@ import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.PermissionsC;
import nl.Steffion.BlockHunt.PermissionsC.PType;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.bukkit.entity.Player;
public class PermissionsManager {
@ -24,12 +23,9 @@ public class PermissionsManager {
* Check if an player has the permission. Also checks * related permissions.
* This permission DOES HAVE TO be registered.
*
* @param player
* The player who needs the permission.
* @param perm
* The permission.
* @param message
* Send a message to the player saying you don't have the
* @param player The player who needs the permission.
* @param perm The permission.
* @param message Send a message to the player saying you don't have the
* permission.
* @return True/False when either the player has the permission.
*/
@ -79,14 +75,10 @@ public class PermissionsManager {
* Check if an player has the permission. Also checks * related permissions.
* This permission does NOT have to be registered.
*
* @param player
* The player who needs the permission.
* @param type
* Type permission.
* @param perm
* The permission.
* @param message
* Send a message to the player saying you don't have the
* @param player The player who needs the permission.
* @param type Type permission.
* @param perm The permission.
* @param message Send a message to the player saying you don't have the
* permission.
* @return True/False when either the player has the permission.
*/

View File

@ -2,64 +2,63 @@ package nl.Steffion.BlockHunt;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
*/
import nl.Steffion.BlockHunt.Managers.CommandManager;
import nl.Steffion.BlockHunt.Managers.ConfigManager;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import nl.Steffion.BlockHunt.Managers.CommandManager;
import nl.Steffion.BlockHunt.Managers.ConfigManager;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class MemoryStorage {
/*
* Standard stuff.
*/
public static ArrayList<String> newFiles = new ArrayList<>();
public static ArrayList<CommandManager> commands = new ArrayList<>();
public static final ArrayList<String> newFiles = new ArrayList<>();
public static final ArrayList<CommandManager> commands = new ArrayList<>();
/*
* If you want another file to be created. Copy and paste this line.
*/
public static ConfigManager config = new ConfigManager("config");
public static ConfigManager messages = new ConfigManager("messages");
public static ConfigManager arenas = new ConfigManager("arenas");
public static ConfigManager signs = new ConfigManager("signs");
public static ConfigManager shop = new ConfigManager("shop");
public static final ConfigManager config = new ConfigManager("config");
public static final ConfigManager messages = new ConfigManager("messages");
public static final ConfigManager arenas = new ConfigManager("arenas");
public static final ConfigManager signs = new ConfigManager("signs");
public static final ConfigManager shop = new ConfigManager("shop");
/*
* Add any variable you need in different classes here:
*/
public static HashMap<Player, Location> pos1 = new HashMap<>();
public static HashMap<Player, Location> pos2 = new HashMap<>();
public static final HashMap<Player, Location> pos1 = new HashMap<>();
public static final HashMap<Player, Location> pos2 = new HashMap<>();
public static ArrayList<Arena> arenaList = new ArrayList<>();
public static Random random = new Random();
public static HashMap<Player, Integer> seekertime = new HashMap<>();
public static final ArrayList<Arena> arenaList = new ArrayList<>();
public static final Random random = new Random();
public static final HashMap<Player, Integer> seekertime = new HashMap<>();
public static HashMap<Player, PlayerArenaData> pData = new HashMap<>();
public static HashMap<Player, ItemStack> choosenBlock = new HashMap<>();
public static HashMap<Player, Boolean> choosenSeeker = new HashMap<>();
public static final HashMap<Player, PlayerArenaData> pData = new HashMap<>();
public static final HashMap<Player, ItemStack> choosenBlock = new HashMap<>();
public static final HashMap<Player, Boolean> choosenSeeker = new HashMap<>();
public static HashMap<Player, ItemStack> pBlock = new HashMap<>();
public static HashMap<Player, Location> moveLoc = new HashMap<>();
public static HashMap<Player, Location> hiddenLoc = new HashMap<>();
public static HashMap<Player, Boolean> hiddenLocWater = new HashMap<>();
public static final HashMap<Player, ItemStack> pBlock = new HashMap<>();
public static final HashMap<Player, Location> moveLoc = new HashMap<>();
public static final HashMap<Player, Location> hiddenLoc = new HashMap<>();
public static final HashMap<Player, Boolean> hiddenLocWater = new HashMap<>();
public static Map<Player, Location> teleportLoc = new HashMap<>();
public static final Map<Player, Location> teleportLoc = new HashMap<>();
}

View File

@ -1,11 +1,12 @@
package nl.Steffion.BlockHunt;
/**
* Steffion's Engine - Made by Steffion.
*
* <p>
* You're allowed to use this engine for own usage, you're not allowed to
* republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin.
*
* <p>
* Thanks for your cooperate!
*
* @author Steffion
@ -13,7 +14,7 @@ package nl.Steffion.BlockHunt;
public class PermissionsC {
public static String main = BlockHunt.pdfFile.getName().toLowerCase() + ".";
public static final String main = BlockHunt.pdfFile.getName().toLowerCase() + ".";
public enum PType {
ALL, PLAYER, MODERATOR, ADMIN, OP
@ -25,8 +26,8 @@ public class PermissionsC {
PType.ADMIN), start("start", PType.MODERATOR), create("create", PType.ADMIN), set("set", PType.MODERATOR), setwarp("setwarp", PType.MODERATOR), signcreate(
"signcreate", PType.MODERATOR), remove("remove", PType.ADMIN), tokens("tokens", PType.ADMIN), allcommands("allcommands", PType.OP);
public String perm;
public PType type;
public final String perm;
public final PType type;
Permissions(String perm, PType type) {
this.perm = perm;

View File

@ -1,23 +1,23 @@
package nl.Steffion.BlockHunt;
import java.util.Collection;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import java.util.Collection;
public class PlayerArenaData {
public GameMode pGameMode;
public ItemStack[] pInventory;
public ItemStack[] pArmor;
public Float pEXP;
public Integer pEXPL;
public Double pMaxHealth;
public Double pHealth;
public Integer pFood;
public Collection<PotionEffect> pPotionEffects;
public boolean pFlying;
public final GameMode pGameMode;
public final ItemStack[] pInventory;
public final ItemStack[] pArmor;
public final Float pEXP;
public final Integer pEXPL;
public final Double pMaxHealth;
public final Double pHealth;
public final Integer pFood;
public final Collection<PotionEffect> pPotionEffects;
public final boolean pFlying;
public PlayerArenaData(Location pLocation, GameMode pGameMode, ItemStack[] pInventory, ItemStack[] pArmor, Float pEXP, Integer pEXPL, Double pMaxHealth, Double pHealth, Integer pFood,
Collection<PotionEffect> pPotionEffects, boolean pFlying) {

View File

@ -2,7 +2,6 @@ package nl.Steffion.BlockHunt;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.DisplaySlot;

View File

@ -1,14 +1,13 @@
package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Sign;
import org.bukkit.event.block.SignChangeEvent;
import java.util.ArrayList;
public class SignsHandler {
public static void createSign(SignChangeEvent event, String[] lines, Location location) {

View File

@ -4,7 +4,6 @@ import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;

View File

@ -53,14 +53,12 @@ shopChoosenBlock: '%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
# Warnings
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
arenaStopped:'%TAG%WThe arena has been forced to stop!'
error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
error-commandNotEnabled:'%TAG%EThis command has been disabled!'

View File

@ -53,14 +53,12 @@ shopChoosenBlock: '%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
# Warnings
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
arenaStopped:'%TAG%WThe arena has been forced to stop!'
error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
error-commandNotEnabled:'%TAG%EThis command has been disabled!'