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. Just code what you would like to see or help with "Accepted" issues.
When commiting use the following symbols: 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. * ~ Changed stuff/others.
Thanks for helping! Thanks for helping!
Read before posting issue 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 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 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, Thank you,

View File

@ -1,9 +1,12 @@
BlockHunt BlockHunt
==== ====
# ![Thanks to ColeRule for making this awesome banner!](http://g2f.nl/0qheg35 "Thanks to ColeRule for making this awesome banner!") # ![Thanks to ColeRule for making this awesome banner!](http://g2f.nl/0qheg35 "Thanks to ColeRule for making this awesome banner!")
## Introduction ## 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". 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 | | 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/)) #### 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/) | | **Issues/Tickets on GitHub** | [Click Here](https://github.com/AddstarMC/BlockHunt/issues/) |
### Features ### Features
* Custom wand for selection arena. * Custom wand for selection arena.
* Multiple arenas. * Multiple arenas.
* **Join/Leave signs!** * **Join/Leave signs!**
@ -37,45 +42,42 @@ This plugin has been heavily inspired from the gamemode "PropHunt", from the gam
* **_And more!_** * **_And more!_**
## Commands & Permissions ## Commands & Permissions
_**Note:** Instead of using /BlockHunt you could use:_ _**Note:** Instead of using /BlockHunt you could use:_
* /bh * /bh
* /hideandseek * /hideandseek
* /seekandfind (from my old plugin) * /seekandfind (from my old plugin)
<> = Required [] = Optional <> = Required [] = Optional
|Command|Description|Permission|| |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
|`/BlockHunt [info/i]`|Displays the plugin's info.|blockhunt.info|_All players have this permission from default._| players have this permission from default._| |`/BlockHunt <reload/r>`|Reloads all
|`/BlockHunt <help/h>`|Shows a list of commands.|blockhunt.help|_All players have this permission from default._| configs.|blockhunt.reload|blockhunt.admin| |`/BlockHunt <join/j> <arenaname>`|Joins a BlockHunt
|`/BlockHunt <reload/r>`|Reloads all configs.|blockhunt.reload|blockhunt.admin| game.|blockhunt.join|blockhunt.player| |`/BlockHunt <leave/l>`|Leave a BlockHunt game.|blockhunt.leave|blockhunt.player|
|`/BlockHunt <join/j> <arenaname>`|Joins a BlockHunt game.|blockhunt.join|blockhunt.player| |`/BlockHunt <list/li>`|Shows a list of available arenas.|blockhunt.list|blockhunt.player| |`/BlockHunt <shop/sh>`|Opens
|`/BlockHunt <leave/l>`|Leave a BlockHunt game.|blockhunt.leave|blockhunt.player| the BlockHunt shop.|blockhunt.shop|blockhunt.player| |`/BlockHunt <start/go> <arenaname>`|Forces an arena to
|`/BlockHunt <list/li>`|Shows a list of available arenas.|blockhunt.list|blockhunt.player| start.|blockhunt.start|blockhunt.moderator| |`/BlockHunt <wand/w>`|Gives you the wand selection
|`/BlockHunt <shop/sh>`|Opens the BlockHunt shop.|blockhunt.shop|blockhunt.player| tool.|blockhunt.create|blockhunt.admin| |`/BlockHunt <create/c> <arenaname>`|Creates an arena from your
|`/BlockHunt <start/go> <arenaname>`|Forces an arena to start.|blockhunt.start|blockhunt.moderator| selection.|blockhunt.create|blockhunt.admin| |`/BlockHunt <set/s> <arenaname>`|Opens a panel to set
|`/BlockHunt <wand/w>`|Gives you the wand selection tool.|blockhunt.create|blockhunt.admin| settings.|blockhunt.set|blockhunt.moderator| |`/BlockHunt <setwarp/sw> <lobby/hiders/seekers/spawn> <arenaname>`|Sets
|`/BlockHunt <create/c> <arenaname>`|Creates an arena from your selection.|blockhunt.create|blockhunt.admin| warps for your arena.|blockhunt.setwarp|blockhunt.moderator| |`/BlockHunt <remove/delete> <arenaname>`|Deletes an
|`/BlockHunt <set/s> <arenaname>`|Opens a panel to set settings.|blockhunt.set|blockhunt.moderator| Arena.|blockhunt.remove|blockhunt.admin| |`/BlockHunt <tokens/t> <set/add/take> <playername> <amount>`|Change someones
|`/BlockHunt <setwarp/sw> <lobby/hiders/seekers/spawn> <arenaname>`|Sets warps for your arena.|blockhunt.setwarp|blockhunt.moderator| tokens.|blockhunt.tokens|blockhunt.admin| ||Able to join full games.|blockhunt.joinfull|blockhunt.moderator| ||Able to
|`/BlockHunt <remove/delete> <arenaname>`|Deletes an Arena.|blockhunt.remove|blockhunt.admin| join/leave using join/leave signs.|blockhunt.joinsign|blockhunt.player| ||Able to create a join/leave
|`/BlockHunt <tokens/t> <set/add/take> <playername> <amount>`|Change someones tokens.|blockhunt.tokens|blockhunt.admin| sign.|blockhunt.signcreate|blockhunt.moderator| ||Gives you the
||Able to join full games.|blockhunt.joinfull|blockhunt.moderator| BlockChooser.|blockhunt.shop.blockchooser|blockhunt.admin| ||Gives you the ability to do all commands
||Able to join/leave using join/leave signs.|blockhunt.joinsign|blockhunt.player| in-game.|blockhunt.allcommands|Operators|
||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 ### Other special permissions
|Permission|Description|
|:--|:--| |Permission|Description| |:--|:--| |`blockhunt.*`|All BlockHunt permissions.| |`blockhunt.player`|All player related
|`blockhunt.*`|All BlockHunt permissions.| permissions.| |`blockhunt.moderator`|All moderator related permissions.| |`blockhunt.admin`|All admin related
|`blockhunt.player`|All player related permissions.| permissions.| |`*`|All permissions on your server, including BlockHunt's 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? ## How to set-up?
Use this video to manage your way through the set-up phase! Use this video to manage your way through the set-up phase!
<a href="http://www.youtube.com/watch?feature=player_embedded&v=msPQ1UMiHWg <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> <modelVersion>4.0.0</modelVersion>
<groupId>nl.Steffion</groupId> <groupId>nl.Steffion</groupId>
<artifactId>BlockHunt</artifactId> <artifactId>BlockHunt</artifactId>

View File

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

View File

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

View File

@ -1,14 +1,10 @@
package nl.Steffion.BlockHunt; package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import java.util.List;
import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.disguisetypes.DisguiseType; import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.MiscDisguise; import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
import nl.Steffion.BlockHunt.Arena.ArenaState; import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Listeners.*; import nl.Steffion.BlockHunt.Commands.CMDTokens;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import nl.Steffion.BlockHunt.Commands.CMDcreate; import nl.Steffion.BlockHunt.Commands.CMDcreate;
import nl.Steffion.BlockHunt.Commands.CMDhelp; import nl.Steffion.BlockHunt.Commands.CMDhelp;
import nl.Steffion.BlockHunt.Commands.CMDinfo; 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.CMDsetwarp;
import nl.Steffion.BlockHunt.Commands.CMDshop; import nl.Steffion.BlockHunt.Commands.CMDshop;
import nl.Steffion.BlockHunt.Commands.CMDstart; import nl.Steffion.BlockHunt.Commands.CMDstart;
import nl.Steffion.BlockHunt.Commands.CMDtokens;
import nl.Steffion.BlockHunt.Commands.CMDwand; 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.CommandManager;
import nl.Steffion.BlockHunt.Managers.ConfigManager; import nl.Steffion.BlockHunt.Managers.ConfigManager;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager; import nl.Steffion.BlockHunt.Managers.PermissionsManager;
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.WordUtils; import org.apache.commons.lang.WordUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -48,14 +57,17 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import java.util.ArrayList;
import java.util.List;
public class BlockHunt extends JavaPlugin implements Listener { public class BlockHunt extends JavaPlugin implements Listener {
/** /**
* Steffion's Engine - Made by Steffion. * Steffion's Engine - Made by Steffion.
* * <p>
* You're allowed to use this engine for own usage, you're not allowed to * 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 * republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin. * credit is placed somewhere in the plugin.
* * <p>
* Thanks for your cooperate! * Thanks for your cooperate!
* *
* @author Steffion * @author Steffion
@ -65,7 +77,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
public static BlockHunt plugin; public static BlockHunt plugin;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public static List<String> BlockHuntCMD = new ArrayList<String>() { public static final List<String> BlockHuntCMD = new ArrayList<String>() {
{ {
add("info"); add("info");
add("help"); add("help");
@ -112,10 +124,6 @@ public class BlockHunt extends JavaPlugin implements Listener {
getServer().getPluginManager().registerEvents(new OnInventoryCloseEvent(), this); getServer().getPluginManager().registerEvents(new OnInventoryCloseEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerSwapHandItemsEvent(), 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 OnPlayerDropItemEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerInteractEvent(), this); getServer().getPluginManager().registerEvents(new OnPlayerInteractEvent(), this);
getServer().getPluginManager().registerEvents(new OnPlayerMoveEvent(), 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, 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>"); (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, 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")) { if (!getServer().getPluginManager().isPluginEnabled("LibsDisguises")) {
MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled); MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled);
@ -457,11 +465,8 @@ public class BlockHunt extends JavaPlugin implements Listener {
/** /**
* Args to String. Makes 1 string. * Args to String. Makes 1 string.
* *
* @param input * @param input String list which should be converted to a string.
* String list which should be converted to a string. * @param startArg Start on this length.
* @param startArg
* Start on this length.
*
* @return The converted string. * @return The converted string.
*/ */
public static String stringBuilder(String[] input, int startArg) { public static String stringBuilder(String[] input, int startArg) {
@ -512,7 +517,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
if (equals) { if (equals) {
if (PermissionsManager.hasPerm(player, command.permission, true)) { if (PermissionsManager.hasPerm(player, command.permission, true)) {
if (command.enabled) { if (command.enabled) {
command.CMD.execute(player, cmd, label, args); return command.CMD.execute(player, cmd, label, args);
} else { } else {
MessageManager.sendFMessage(player, ConfigC.error_commandNotEnabled); 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. * Short a String for like the Scoreboard title.
* *
* @param string * @param string String to be shorten.
* String to be shorten. * @param maxLenght Max lenght of the characters.
* @param maxLenght
* Max lenght of the characters.
* @return Shorten string, else normal string. * @return Shorten string, else normal string.
*/ */
public static String cutString(String string, int maxLenght) { 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; package nl.Steffion.BlockHunt.Commands;
import java.util.ArrayList; import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.*;
import nl.Steffion.BlockHunt.Arena.ArenaState; 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.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.ScoreboardHandler;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.util.ArrayList;
public class CMDcreate extends DefaultCMD { public class CMDcreate extends DefaultCMD {
@Override @Override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,11 @@
package nl.Steffion.BlockHunt.Commands; package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.*; import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.MemoryStorage; 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.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,7 +1,6 @@
package nl.Steffion.BlockHunt.Commands; package nl.Steffion.BlockHunt.Commands;
import nl.Steffion.BlockHunt.InventoryHandler; import nl.Steffion.BlockHunt.InventoryHandler;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.entity.Player; 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.Arena.ArenaState;
import nl.Steffion.BlockHunt.BlockHunt; import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC; import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.entity.Player; 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; package nl.Steffion.BlockHunt.Commands;
import java.util.ArrayList;
import java.util.List;
import nl.Steffion.BlockHunt.ConfigC; import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@ -14,6 +10,9 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import java.util.ArrayList;
import java.util.List;
public class CMDwand extends DefaultCMD { public class CMDwand extends DefaultCMD {
@Override @Override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,16 @@
package nl.Steffion.BlockHunt.Listeners; package nl.Steffion.BlockHunt.Listeners;
import nl.Steffion.BlockHunt.*; import nl.Steffion.BlockHunt.Arena;
import nl.Steffion.BlockHunt.Arena.ArenaState; import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.PermissionsC.Permissions; import nl.Steffion.BlockHunt.ArenaHandler;
import nl.Steffion.BlockHunt.MemoryStorage; import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.InventoryHandler;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import nl.Steffion.BlockHunt.Managers.PermissionsManager; 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.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

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

View File

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

View File

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

View File

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

View File

@ -1,33 +1,33 @@
package nl.Steffion.BlockHunt.Managers; package nl.Steffion.BlockHunt.Managers;
/** /**
* Steffion's Engine - Made by Steffion. * Steffion's Engine - Made by Steffion.
* * <p>
* You're allowed to use this engine for own usage, you're not allowed to * 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 * republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin. * credit is placed somewhere in the plugin.
* * <p>
* Thanks for your cooperate! * Thanks for your cooperate!
* *
* @author Steffion * @author Steffion
*/ */
import java.io.File;
import nl.Steffion.BlockHunt.BlockHunt; import nl.Steffion.BlockHunt.BlockHunt;
import nl.Steffion.BlockHunt.ConfigC; import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage; import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
public class ConfigManager { public class ConfigManager {
private String fileName; private final String fileName;
private File file; private final File file;
private FileConfiguration fileC; private final FileConfiguration fileC;
private ConfigurationSection fileCS; private final ConfigurationSection fileCS;
private File fileLocation; private final File fileLocation;
/** /**
* Use this class to create an automated config file. * 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.ConfigC;
import nl.Steffion.BlockHunt.MemoryStorage; import nl.Steffion.BlockHunt.MemoryStorage;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; 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 * Send a message to a player. Also replaces the "%player%" variable to the
* player's name. * player's name.
* *
* @param player * @param player The player receiving the message.
* The player receiving the message. * @param message Message which needs to be send to the player.
* @param message * @param vars Variables. Seperated with a - . Ex: "playerName-" +
* Message which needs to be send to the player.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
*/ */
public static void sendMessage(Player player, String message, String... vars) { 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%" * Send a message to a player from a Config. Also replaces the "%player%"
* variable to the player's name. * variable to the player's name.
* *
* @param player * @param player The player receiving the message.
* The player receiving the message. * @param location Location in the config of the message being send.
* @param location * @param vars Variables. Seperated with a - . Ex: "playerName-" +
* Location in the config of the message being send.
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
*/ */
public static void sendFMessage(Player player, ConfigC location, String... vars) { 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%" * Send a message to all players online. Also replaces the "%player%"
* variable to the player's name. * variable to the player's name.
* *
* @param message * @param message Message which needs to be send to the player.
* Message which needs to be send to the player. * @param vars Variables. Seperated with a - . Ex: "playerName-" +
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
*/ */
public static void broadcastMessage(String message, String... vars) { public static void broadcastMessage(String message, String... vars) {
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
// String pMessage = message.replaceAll("%player%",
// player.getName());
player.sendMessage(MessageManager.replaceAll(message.replaceAll("%player%", player.getDisplayName()), vars)); 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)); 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 * Send a message to all players online from a Config. Also replaces the
* "%player%" variable to the player's name. * "%player%" variable to the player's name.
* *
* @param location * @param location Location in the config of the message being send.
* Location in the config of the message being send. * @param vars Variables . Seperated with a - . Ex: "playerName-" +
* @param vars
* Variables . Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
*/ */
public static void broadcastFMessage(ConfigC location, String... vars) { public static void broadcastFMessage(ConfigC location, String... vars) {
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
// String pMessage =
// location.config.getFile().get(location.location) player.sendMessage(MessageManager.replaceAll(location.config.getFile().get(
// .toString().replaceAll("%player%", player.getName()); 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) Bukkit.getConsoleSender().sendMessage(MessageManager.replaceAll(location.config.getFile().get(
// .toString().replaceAll("%player%", "Console"); 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. * Replace all variables.
* *
* @param message * @param message Message which needs to be replaced.
* Message which needs to be replaced. * @param vars Variables. Seperated with a - . Ex: "playerName-" +
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
* @return String with the message with values replaced * @return String with the message with values replaced
*/ */
@ -119,8 +101,7 @@ public class MessageManager {
/** /**
* Replace default Minecraft colour codes. * Replace default Minecraft colour codes.
* *
* @param message * @param message Message which needs to be replaced.
* Message which needs to be replaced.
* @return Colour replaced message. * @return Colour replaced message.
*/ */
public static String replaceColours(String message) { public static String replaceColours(String message) {
@ -130,8 +111,7 @@ public class MessageManager {
/** /**
* Replace colour codes of this plugin. * Replace colour codes of this plugin.
* *
* @param message * @param message Message which needs to be replaced.
* Message which needs to be replaced.
* @return Colour replaced message. * @return Colour replaced message.
*/ */
public static String replaceColourVars(String message) { public static String replaceColourVars(String message) {
@ -147,10 +127,8 @@ public class MessageManager {
/** /**
* Replace custom variables. * Replace custom variables.
* *
* @param message * @param message Message which needs to be replaced.
* Message which needs to be replaced. * @param vars Variables. Seperated with a - . Ex: "playerName-" +
* @param vars
* Variables. Seperated with a - . Ex: "playerName-" +
* player.getName(); * player.getName();
* @return Replaced String. * @return Replaced String.
*/ */

View File

@ -4,7 +4,6 @@ import nl.Steffion.BlockHunt.ConfigC;
import nl.Steffion.BlockHunt.PermissionsC; import nl.Steffion.BlockHunt.PermissionsC;
import nl.Steffion.BlockHunt.PermissionsC.PType; import nl.Steffion.BlockHunt.PermissionsC.PType;
import nl.Steffion.BlockHunt.PermissionsC.Permissions; import nl.Steffion.BlockHunt.PermissionsC.Permissions;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public class PermissionsManager { public class PermissionsManager {
@ -24,12 +23,9 @@ public class PermissionsManager {
* Check if an player has the permission. Also checks * related permissions. * Check if an player has the permission. Also checks * related permissions.
* This permission DOES HAVE TO be registered. * This permission DOES HAVE TO be registered.
* *
* @param player * @param player The player who needs the permission.
* The player who needs the permission. * @param perm The permission.
* @param perm * @param message Send a message to the player saying you don't have the
* The permission.
* @param message
* Send a message to the player saying you don't have the
* permission. * permission.
* @return True/False when either the player has 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. * Check if an player has the permission. Also checks * related permissions.
* This permission does NOT have to be registered. * This permission does NOT have to be registered.
* *
* @param player * @param player The player who needs the permission.
* The player who needs the permission. * @param type Type permission.
* @param type * @param perm The permission.
* Type permission. * @param message Send a message to the player saying you don't have the
* @param perm
* The permission.
* @param message
* Send a message to the player saying you don't have the
* permission. * permission.
* @return True/False when either the player has 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. * Steffion's Engine - Made by Steffion.
* * <p>
* You're allowed to use this engine for own usage, you're not allowed to * 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 * republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin. * credit is placed somewhere in the plugin.
* * <p>
* Thanks for your cooperate! * Thanks for your cooperate!
* *
* @author Steffion * @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.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Random; 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 { public class MemoryStorage {
/* /*
* Standard stuff. * Standard stuff.
*/ */
public static ArrayList<String> newFiles = new ArrayList<>(); public static final ArrayList<String> newFiles = new ArrayList<>();
public static ArrayList<CommandManager> commands = new ArrayList<>(); public static final ArrayList<CommandManager> commands = new ArrayList<>();
/* /*
* If you want another file to be created. Copy and paste this line. * If you want another file to be created. Copy and paste this line.
*/ */
public static ConfigManager config = new ConfigManager("config"); public static final ConfigManager config = new ConfigManager("config");
public static ConfigManager messages = new ConfigManager("messages"); public static final ConfigManager messages = new ConfigManager("messages");
public static ConfigManager arenas = new ConfigManager("arenas"); public static final ConfigManager arenas = new ConfigManager("arenas");
public static ConfigManager signs = new ConfigManager("signs"); public static final ConfigManager signs = new ConfigManager("signs");
public static ConfigManager shop = new ConfigManager("shop"); public static final ConfigManager shop = new ConfigManager("shop");
/* /*
* Add any variable you need in different classes here: * Add any variable you need in different classes here:
*/ */
public static HashMap<Player, Location> pos1 = new HashMap<>(); public static final HashMap<Player, Location> pos1 = new HashMap<>();
public static HashMap<Player, Location> pos2 = new HashMap<>(); public static final HashMap<Player, Location> pos2 = new HashMap<>();
public static ArrayList<Arena> arenaList = new ArrayList<>(); public static final ArrayList<Arena> arenaList = new ArrayList<>();
public static Random random = new Random(); public static final Random random = new Random();
public static HashMap<Player, Integer> seekertime = new HashMap<>(); public static final HashMap<Player, Integer> seekertime = new HashMap<>();
public static HashMap<Player, PlayerArenaData> pData = new HashMap<>(); public static final HashMap<Player, PlayerArenaData> pData = new HashMap<>();
public static HashMap<Player, ItemStack> choosenBlock = new HashMap<>(); public static final HashMap<Player, ItemStack> choosenBlock = new HashMap<>();
public static HashMap<Player, Boolean> choosenSeeker = new HashMap<>(); public static final HashMap<Player, Boolean> choosenSeeker = new HashMap<>();
public static HashMap<Player, ItemStack> pBlock = new HashMap<>(); public static final HashMap<Player, ItemStack> pBlock = new HashMap<>();
public static HashMap<Player, Location> moveLoc = new HashMap<>(); public static final HashMap<Player, Location> moveLoc = new HashMap<>();
public static HashMap<Player, Location> hiddenLoc = new HashMap<>(); public static final HashMap<Player, Location> hiddenLoc = new HashMap<>();
public static HashMap<Player, Boolean> hiddenLocWater = 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; package nl.Steffion.BlockHunt;
/** /**
* Steffion's Engine - Made by Steffion. * Steffion's Engine - Made by Steffion.
* * <p>
* You're allowed to use this engine for own usage, you're not allowed to * 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 * republish the engine. Using this for your own plugin is allowed when a
* credit is placed somewhere in the plugin. * credit is placed somewhere in the plugin.
* * <p>
* Thanks for your cooperate! * Thanks for your cooperate!
* *
* @author Steffion * @author Steffion
@ -13,7 +14,7 @@ package nl.Steffion.BlockHunt;
public class PermissionsC { public class PermissionsC {
public static String main = BlockHunt.pdfFile.getName().toLowerCase() + "."; public static final String main = BlockHunt.pdfFile.getName().toLowerCase() + ".";
public enum PType { public enum PType {
ALL, PLAYER, MODERATOR, ADMIN, OP 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( 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); "signcreate", PType.MODERATOR), remove("remove", PType.ADMIN), tokens("tokens", PType.ADMIN), allcommands("allcommands", PType.OP);
public String perm; public final String perm;
public PType type; public final PType type;
Permissions(String perm, PType type) { Permissions(String perm, PType type) {
this.perm = perm; this.perm = perm;

View File

@ -1,23 +1,23 @@
package nl.Steffion.BlockHunt; package nl.Steffion.BlockHunt;
import java.util.Collection;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import java.util.Collection;
public class PlayerArenaData { public class PlayerArenaData {
public GameMode pGameMode; public final GameMode pGameMode;
public ItemStack[] pInventory; public final ItemStack[] pInventory;
public ItemStack[] pArmor; public final ItemStack[] pArmor;
public Float pEXP; public final Float pEXP;
public Integer pEXPL; public final Integer pEXPL;
public Double pMaxHealth; public final Double pMaxHealth;
public Double pHealth; public final Double pHealth;
public Integer pFood; public final Integer pFood;
public Collection<PotionEffect> pPotionEffects; public final Collection<PotionEffect> pPotionEffects;
public boolean pFlying; public final boolean pFlying;
public PlayerArenaData(Location pLocation, GameMode pGameMode, ItemStack[] pInventory, ItemStack[] pArmor, Float pEXP, Integer pEXPL, Double pMaxHealth, Double pHealth, Integer pFood, 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) { 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.Arena.ArenaState;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.DisplaySlot;

View File

@ -1,14 +1,13 @@
package nl.Steffion.BlockHunt; package nl.Steffion.BlockHunt;
import java.util.ArrayList;
import nl.Steffion.BlockHunt.Arena.ArenaState; import nl.Steffion.BlockHunt.Arena.ArenaState;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Sign; import org.bukkit.block.Sign;
import org.bukkit.event.block.SignChangeEvent; import org.bukkit.event.block.SignChangeEvent;
import java.util.ArrayList;
public class SignsHandler { public class SignsHandler {
public static void createSign(SignChangeEvent event, String[] lines, Location location) { 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.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.MiscDisguise; import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
import nl.Steffion.BlockHunt.Managers.MessageManager; import nl.Steffion.BlockHunt.Managers.MessageManager;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; 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!' shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!' shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N' ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
# Warnings # Warnings
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!' 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!' ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.' unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!' ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
arenaStopped:'%TAG%WThe arena has been forced to stop!' arenaStopped:'%TAG%WThe arena has been forced to stop!'
error-noPermission:'%TAG%EYou don''t have the permissions to do that!' error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!' error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
error-commandNotEnabled:'%TAG%EThis command has been disabled!' 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!' shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!' shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N' ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
# Warnings # Warnings
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!' 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!' ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.' unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!' ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
arenaStopped:'%TAG%WThe arena has been forced to stop!' arenaStopped:'%TAG%WThe arena has been forced to stop!'
error-noPermission:'%TAG%EYou don''t have the permissions to do that!' error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!' error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
error-commandNotEnabled:'%TAG%EThis command has been disabled!' error-commandNotEnabled:'%TAG%EThis command has been disabled!'