Fixes some warnings, typos and redundancy
This commit is contained in:
parent
be6ca823fe
commit
f8292f54b7
18
.github/CONTRIBUTING.md
vendored
18
.github/CONTRIBUTING.md
vendored
@ -4,7 +4,7 @@ Contributing to BlockHunt
|
||||
If you want to contribute to BlockHunt you're welcome to do so!
|
||||
Just code what you would like to see or help with "Accepted" issues.
|
||||
|
||||
When commiting use the following symbols:
|
||||
When committing use the following symbols:
|
||||
|
||||
*
|
||||
+ For new features/code.
|
||||
@ -28,29 +28,29 @@ should be tested to see if they are working.
|
||||
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.
|
||||
giving an error, then remove that plugin and don't go putting issues on that are not 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
|
||||
|
||||
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 you're 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
|
||||
|
||||
7: Check if the issue already exists - Look on Github at all the issues first before you go posting an issue, we are
|
||||
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
|
||||
|
||||
NOTE: Bugs will always be fixed first before implementing ideas so please don't spam us.
|
||||
|
||||
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 written this up is that we are sick to the back teeth of issues that don't
|
||||
need to be reported.
|
||||
|
||||
Thank you,
|
||||
|
||||
|
6
pom.xml
6
pom.xml
@ -83,6 +83,12 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.configuration.serialization.SerializableAs;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -106,13 +107,13 @@ public class Arena implements ConfigurationSerializable {
|
||||
public enum ArenaState {
|
||||
WAITING,
|
||||
STARTING,
|
||||
INGAME,
|
||||
IN_GAME,
|
||||
RESTARTING,
|
||||
DISABLED
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> serialize() {
|
||||
public @NotNull Map<String, Object> serialize() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("arenaName", arenaName);
|
||||
map.put("pos1", pos1);
|
||||
@ -144,7 +145,7 @@ public class Arena implements ConfigurationSerializable {
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "unused"})
|
||||
public static Arena deserialize(Map<String, Object> map) {
|
||||
Location loc = new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0);
|
||||
return new Arena(
|
||||
|
@ -49,7 +49,7 @@ public class ArenaHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static void playerJoinArena(Player player, String arenaname) {
|
||||
public static void playerJoinArena(Player player, String arenaName) {
|
||||
boolean found = false;
|
||||
boolean alreadyJoined = false;
|
||||
for (Arena arena : MemoryStorage.arenaList) {
|
||||
@ -62,29 +62,29 @@ public class ArenaHandler {
|
||||
|
||||
if (!alreadyJoined) {
|
||||
for (Arena arena : MemoryStorage.arenaList) {
|
||||
if (arena.arenaName.equalsIgnoreCase(arenaname)) {
|
||||
if (arena.arenaName.equalsIgnoreCase(arenaName)) {
|
||||
found = true;
|
||||
if (arena.disguiseBlocks.isEmpty()) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_joinNoBlocksSet);
|
||||
} else {
|
||||
boolean inventoryempty = true;
|
||||
for (ItemStack invitem : player.getInventory()) {
|
||||
if (invitem != null) {
|
||||
if (invitem.getType() != Material.AIR) {
|
||||
inventoryempty = false;
|
||||
boolean inventoryEmpty = true;
|
||||
for (ItemStack inventoryItem : player.getInventory()) {
|
||||
if (inventoryItem != null) {
|
||||
if (inventoryItem.getType() != Material.AIR) {
|
||||
inventoryEmpty = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack invitem : player.getInventory().getArmorContents()) {
|
||||
if (invitem != null) {
|
||||
if (invitem.getType() != Material.AIR) {
|
||||
inventoryempty = false;
|
||||
for (ItemStack inventoryItem : player.getInventory().getArmorContents()) {
|
||||
if (inventoryItem != null) {
|
||||
if (inventoryItem.getType() != Material.AIR) {
|
||||
inventoryEmpty = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((Boolean) MemoryStorage.config.get(ConfigC.requireInventoryClearOnJoin) && !inventoryempty) {
|
||||
if ((Boolean) MemoryStorage.config.get(ConfigC.requireInventoryClearOnJoin) && !inventoryEmpty) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_joinInventoryNotEmpty);
|
||||
return;
|
||||
}
|
||||
@ -106,7 +106,7 @@ public class ArenaHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("[BlockHunt] " + player.getName() + " has joined " + arenaname);
|
||||
System.out.println("[BlockHunt] " + player.getName() + " has joined " + arenaName);
|
||||
arena.playersInArena.add(player);
|
||||
JoinArenaEvent event = new JoinArenaEvent(player, arena);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
@ -137,18 +137,18 @@ public class ArenaHandler {
|
||||
|
||||
// Fix for client not showing players after
|
||||
// they join
|
||||
for (Player otherplayer : arena.playersInArena) {
|
||||
if (otherplayer.canSee(player)) {
|
||||
otherplayer.showPlayer(BlockHunt.plugin, player); // Make
|
||||
}
|
||||
for (Player otherPlayer : arena.playersInArena) {
|
||||
if (otherPlayer.canSee(player)) {
|
||||
otherPlayer.showPlayer(BlockHunt.plugin, player); // Make
|
||||
}
|
||||
// new
|
||||
// player
|
||||
// visible
|
||||
// to
|
||||
// others
|
||||
if (player.canSee(otherplayer)) {
|
||||
player.showPlayer(BlockHunt.plugin, otherplayer); // Make
|
||||
}
|
||||
if (player.canSee(otherPlayer)) {
|
||||
player.showPlayer(BlockHunt.plugin, otherPlayer); // Make
|
||||
}
|
||||
// other
|
||||
// players
|
||||
// visible
|
||||
@ -163,12 +163,12 @@ public class ArenaHandler {
|
||||
ItemStack shopBlockChooser = new ItemStack(Material.getMaterial((String) MemoryStorage.config.get(ConfigC.shop_blockChooserv1IDname)), 1);
|
||||
ItemMeta shopBlockChooser_IM = shopBlockChooser.getItemMeta();
|
||||
shopBlockChooser_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_blockChooserv1Name)));
|
||||
List<String> lores = MemoryStorage.config.getFile().getStringList(ConfigC.shop_blockChooserv1Description.location);
|
||||
List<String> lores2 = new ArrayList<>();
|
||||
for (String lore : lores) {
|
||||
lores2.add(MessageManager.replaceAll(lore));
|
||||
List<String> loreStrings = MemoryStorage.config.getFile().getStringList(ConfigC.shop_blockChooserv1Description.location);
|
||||
List<String> loreStrings2 = new ArrayList<>();
|
||||
for (String lore : loreStrings) {
|
||||
loreStrings2.add(MessageManager.replaceAll(lore));
|
||||
}
|
||||
shopBlockChooser_IM.setLore(lores2);
|
||||
shopBlockChooser_IM.setLore(loreStrings2);
|
||||
shopBlockChooser.setItemMeta(shopBlockChooser_IM);
|
||||
|
||||
player.getInventory().addItem(shopBlockChooser);
|
||||
@ -181,13 +181,13 @@ public class ArenaHandler {
|
||||
1);
|
||||
ItemMeta shopBlockHuntPass_IM = shopBlockHuntPass.getItemMeta();
|
||||
shopBlockHuntPass_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)));
|
||||
List<String> lores = MemoryStorage.config.getFile().getStringList(ConfigC.shop_BlockHuntPassv2Description.location);
|
||||
List<String> lores2 = new ArrayList<>();
|
||||
for (String lore : lores) {
|
||||
lores2.add(MessageManager.replaceAll(lore));
|
||||
List<String> loreStrings = MemoryStorage.config.getFile().getStringList(ConfigC.shop_BlockHuntPassv2Description.location);
|
||||
List<String> loreStrings2 = new ArrayList<>();
|
||||
for (String lore : loreStrings) {
|
||||
loreStrings2.add(MessageManager.replaceAll(lore));
|
||||
}
|
||||
|
||||
shopBlockHuntPass_IM.setLore(lores2);
|
||||
shopBlockHuntPass_IM.setLore(loreStrings2);
|
||||
shopBlockHuntPass.setItemMeta(shopBlockHuntPass_IM);
|
||||
shopBlockHuntPass.setAmount(MemoryStorage.shop.getFile().getInt(player.getName() + ".blockhuntpass"));
|
||||
|
||||
@ -221,7 +221,7 @@ public class ArenaHandler {
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_noArena, "name-" + arenaname);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_noArena, "name-" + arenaName);
|
||||
}
|
||||
|
||||
SignsHandler.updateSigns();
|
||||
@ -256,7 +256,7 @@ public class ArenaHandler {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.warning_lobbyNeedAtleast, "1-" + arena.minPlayers);
|
||||
}
|
||||
|
||||
if (arena.playersInArena.size() <= 1 && arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.playersInArena.size() <= 1 && arena.gameState == ArenaState.IN_GAME) {
|
||||
if (arena.seekers.size() >= arena.playersInArena.size()) {
|
||||
ArenaHandler.seekersWin(arena);
|
||||
} else {
|
||||
@ -268,7 +268,7 @@ public class ArenaHandler {
|
||||
ArenaHandler.seekersWin(arena);
|
||||
}
|
||||
|
||||
if (arena.seekers.size() <= 0 && arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.seekers.size() <= 0 && arena.gameState == ArenaState.IN_GAME) {
|
||||
Player seeker = arena.playersInArena.get(MemoryStorage.random.nextInt(arena.playersInArena.size()));
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.warning_ingameNEWSeekerChoosen, "seeker-" + seeker.getName());
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameSeekerChoosen, "seeker-" + seeker.getName());
|
||||
@ -283,14 +283,14 @@ public class ArenaHandler {
|
||||
seeker.setWalkSpeed(0.3F);
|
||||
|
||||
// Fix for client not showing players after they join
|
||||
for (Player otherplayer : arena.playersInArena) {
|
||||
if (otherplayer.canSee(player)) {
|
||||
otherplayer.showPlayer(BlockHunt.plugin, player); // Make new player
|
||||
}
|
||||
for (Player otherPlayer : arena.playersInArena) {
|
||||
if (otherPlayer.canSee(player)) {
|
||||
otherPlayer.showPlayer(BlockHunt.plugin, player); // Make new player
|
||||
}
|
||||
// visible to others
|
||||
if (player.canSee(otherplayer)) {
|
||||
player.showPlayer(BlockHunt.plugin, otherplayer); // Make other
|
||||
}
|
||||
if (player.canSee(otherPlayer)) {
|
||||
player.showPlayer(BlockHunt.plugin, otherPlayer); // Make other
|
||||
}
|
||||
// players visible
|
||||
// to new player
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import me.libraryaddict.disguise.DisguiseAPI;
|
||||
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
||||
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
|
||||
import nl.Steffion.BlockHunt.Arena.ArenaState;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDCreate;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDHelp;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDInfo;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDJoin;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDTokens;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDcreate;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDhelp;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDinfo;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDjoin;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDleave;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDlist;
|
||||
import nl.Steffion.BlockHunt.Commands.CMDnotfound;
|
||||
@ -45,6 +45,7 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.command.Command;
|
||||
@ -56,6 +57,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -77,7 +79,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
public static BlockHunt plugin;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final List<String> BlockHuntCMD = new ArrayList<String>() {
|
||||
public static final List<String> BlockHuntCMD = new ArrayList<>() {
|
||||
{
|
||||
add("info");
|
||||
add("help");
|
||||
@ -97,20 +99,20 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
};
|
||||
|
||||
public static CommandManager CMD;
|
||||
public static CommandManager CMDinfo;
|
||||
public static CommandManager CMDhelp;
|
||||
public static CommandManager CMDreload;
|
||||
public static CommandManager CMDjoin;
|
||||
public static CommandManager CMDleave;
|
||||
public static CommandManager CMDlist;
|
||||
public static CommandManager CMDshop;
|
||||
public static CommandManager CMDstart;
|
||||
public static CommandManager CMDwand;
|
||||
public static CommandManager CMDcreate;
|
||||
public static CommandManager CMDset;
|
||||
public static CommandManager CMDsetwarp;
|
||||
public static CommandManager CMDremove;
|
||||
public static CommandManager CMDtokens;
|
||||
public static CommandManager CMDInfo;
|
||||
public static CommandManager CMDHelp;
|
||||
public static CommandManager CMDReload;
|
||||
public static CommandManager CMDJoin;
|
||||
public static CommandManager CMDLeave;
|
||||
public static CommandManager CMDList;
|
||||
public static CommandManager CMDShop;
|
||||
public static CommandManager CMDStart;
|
||||
public static CommandManager CMDWand;
|
||||
public static CommandManager CMDCreate;
|
||||
public static CommandManager CMDSet;
|
||||
public static CommandManager CMDSetWarp;
|
||||
public static CommandManager CMDRemove;
|
||||
public static CommandManager CMDTokens;
|
||||
|
||||
public void onEnable() {
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
@ -139,36 +141,36 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
ConfigManager.newFiles();
|
||||
|
||||
CMD = new CommandManager("BlockHunt", "BlockHunt", null, null, Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info), BlockHuntCMD,
|
||||
new CMDinfo(), null);
|
||||
CMDinfo = new CommandManager("BlockHunt INFO", "BlockHunt", "info", "i", Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info),
|
||||
BlockHuntCMD, new CMDinfo(), "/BlockHunt [info|i]");
|
||||
CMDhelp = new CommandManager("BlockHunt HELP", "BlockHunt", "help", "h", Permissions.help, ConfigC.help_help, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_help),
|
||||
BlockHuntCMD, new CMDhelp(), "/BlockHunt <help|h> [page number]");
|
||||
CMDreload = new CommandManager("BlockHunt RELOAD", "BlockHunt", "reload", "r", Permissions.reload, ConfigC.help_reload,
|
||||
new CMDInfo(), null);
|
||||
CMDInfo = new CommandManager("BlockHunt INFO", "BlockHunt", "info", "i", Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info),
|
||||
BlockHuntCMD, new CMDInfo(), "/BlockHunt [info|i]");
|
||||
CMDHelp = new CommandManager("BlockHunt HELP", "BlockHunt", "help", "h", Permissions.help, ConfigC.help_help, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_help),
|
||||
BlockHuntCMD, new CMDHelp(), "/BlockHunt <help|h> [page number]");
|
||||
CMDReload = new CommandManager("BlockHunt RELOAD", "BlockHunt", "reload", "r", Permissions.reload, ConfigC.help_reload,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_reload), BlockHuntCMD, new CMDreload(), "/BlockHunt <reload|r>");
|
||||
CMDjoin = new CommandManager("BlockHunt JOIN", "BlockHunt", "join", "j", Permissions.join, ConfigC.help_join, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_join),
|
||||
BlockHuntCMD, new CMDjoin(), "/BlockHunt <join|j> <arenaname>");
|
||||
CMDleave = new CommandManager("BlockHunt LEAVE", "BlockHunt", "leave", "l", Permissions.leave, ConfigC.help_leave,
|
||||
CMDJoin = new CommandManager("BlockHunt JOIN", "BlockHunt", "join", "j", Permissions.join, ConfigC.help_join, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_join),
|
||||
BlockHuntCMD, new CMDJoin(), "/BlockHunt <join|j> <arena name>");
|
||||
CMDLeave = new CommandManager("BlockHunt LEAVE", "BlockHunt", "leave", "l", Permissions.leave, ConfigC.help_leave,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_leave), BlockHuntCMD, new CMDleave(), "/BlockHunt <leave|l>");
|
||||
CMDlist = new CommandManager("BlockHunt LIST", "BlockHunt", "list", "li", Permissions.list, ConfigC.help_list, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_list),
|
||||
CMDList = new CommandManager("BlockHunt LIST", "BlockHunt", "list", "li", Permissions.list, ConfigC.help_list, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_list),
|
||||
BlockHuntCMD, new CMDlist(), "/BlockHunt <list|li>");
|
||||
CMDshop = new CommandManager("BlockHunt SHOP", "BlockHunt", "shop", "sh", Permissions.shop, ConfigC.help_shop, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_shop),
|
||||
CMDShop = new CommandManager("BlockHunt SHOP", "BlockHunt", "shop", "sh", Permissions.shop, ConfigC.help_shop, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_shop),
|
||||
BlockHuntCMD, new CMDshop(), "/BlockHunt <shop|sh>");
|
||||
CMDstart = new CommandManager("BlockHunt START", "BlockHunt", "start", "go", Permissions.start, ConfigC.help_start,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_start), BlockHuntCMD, new CMDstart(), "/BlockHunt <start|go> <arenaname>");
|
||||
CMDwand = new CommandManager("BlockHunt WAND", "BlockHunt", "wand", "w", Permissions.create, ConfigC.help_wand, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_wand),
|
||||
CMDStart = new CommandManager("BlockHunt START", "BlockHunt", "start", "go", Permissions.start, ConfigC.help_start,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_start), BlockHuntCMD, new CMDstart(), "/BlockHunt <start|go> <arena name>");
|
||||
CMDWand = new CommandManager("BlockHunt WAND", "BlockHunt", "wand", "w", Permissions.create, ConfigC.help_wand, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_wand),
|
||||
BlockHuntCMD, new CMDwand(), "/BlockHunt <wand|w>");
|
||||
CMDcreate = new CommandManager("BlockHunt CREATE", "BlockHunt", "create", "c", Permissions.create, ConfigC.help_create,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_create), BlockHuntCMD, new CMDcreate(), "/BlockHunt <create|c> <arenaname>");
|
||||
CMDset = new CommandManager("BlockHunt SET", "BlockHunt", "set", "s", Permissions.set, ConfigC.help_set, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_set),
|
||||
BlockHuntCMD, new CMDset(), "/BlockHunt <set|s> <arenaname>");
|
||||
CMDsetwarp = new CommandManager("BlockHunt SETWARP", "BlockHunt", "setwarp", "sw", Permissions.setwarp, ConfigC.help_setwarp,
|
||||
CMDCreate = new CommandManager("BlockHunt CREATE", "BlockHunt", "create", "c", Permissions.create, ConfigC.help_create,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_create), BlockHuntCMD, new CMDCreate(), "/BlockHunt <create|c> <arena name>");
|
||||
CMDSet = new CommandManager("BlockHunt SET", "BlockHunt", "set", "s", Permissions.set, ConfigC.help_set, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_set),
|
||||
BlockHuntCMD, new CMDset(), "/BlockHunt <set|s> <arena name>");
|
||||
CMDSetWarp = new CommandManager("BlockHunt SETWARP", "BlockHunt", "setwarp", "sw", Permissions.setwarp, ConfigC.help_setwarp,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_setwarp), BlockHuntCMD, new CMDsetwarp(),
|
||||
"/BlockHunt <setwarp|sw> <lobby|hiders|seekers|spawn> <arenaname>");
|
||||
CMDremove = new CommandManager("BlockHunt REMOVE", "BlockHunt", "remove", "delete", Permissions.remove, ConfigC.help_remove,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_remove), BlockHuntCMD, new CMDremove(), "/BlockHunt <remove|delete> <arenaname>");
|
||||
CMDtokens = new CommandManager("BlockHunt TOKENS", "BlockHunt", "tokens", "t", Permissions.tokens, ConfigC.help_tokens,
|
||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_tokens), BlockHuntCMD, new CMDTokens(), "/BlockHunt <tokens|t> <set|add|take> <playername> <amount>");
|
||||
"/BlockHunt <setwarp|sw> <lobby|hiders|seekers|spawn> <arena name>");
|
||||
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> <arena name>");
|
||||
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> <player name> <amount>");
|
||||
|
||||
if (!getServer().getPluginManager().isPluginEnabled("LibsDisguises")) {
|
||||
MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled);
|
||||
@ -199,30 +201,18 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
} else if (arena.gameState == ArenaState.STARTING) {
|
||||
arena.timer = arena.timer - 1;
|
||||
if (arena.timer > 0) {
|
||||
if (arena.timer == 60) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-60");
|
||||
} else if (arena.timer == 30) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-30");
|
||||
} else if (arena.timer == 10) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-10");
|
||||
} else if (arena.timer == 5) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-5");
|
||||
} else if (arena.timer == 4) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-4");
|
||||
} else if (arena.timer == 3) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-3");
|
||||
} else if (arena.timer == 2) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-2");
|
||||
} else if (arena.timer == 1) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 2);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-1");
|
||||
if (arena.timer == 60 || arena.timer == 30 || arena.timer == 10) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||
} else if (arena.timer <= 5) {
|
||||
World world = arena.lobbyWarp.getWorld();
|
||||
if (world != null) {
|
||||
int pitch = (int) (2 - Math.floor(arena.timer / 2.0));
|
||||
world.playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, pitch);
|
||||
}
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||
}
|
||||
} else {
|
||||
arena.gameState = ArenaState.INGAME;
|
||||
arena.gameState = ArenaState.IN_GAME;
|
||||
arena.timer = arena.gameTime;
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaStarted, "secs-" + arena.waitingTimeSeeker);
|
||||
|
||||
@ -313,7 +303,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.gameState == ArenaState.IN_GAME) {
|
||||
arena.timer = arena.timer - 1;
|
||||
if (arena.timer > 0) {
|
||||
if (arena.timer == arena.gameTime - arena.timeUntilHidersSword) {
|
||||
@ -343,29 +333,15 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameBlocksLeft, "1-" + blocklist);
|
||||
}
|
||||
|
||||
if (arena.timer == 190) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-190");
|
||||
} else if (arena.timer == 60) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-60");
|
||||
} else if (arena.timer == 30) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-30");
|
||||
} else if (arena.timer == 10) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-10");
|
||||
} else if (arena.timer == 5) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-5");
|
||||
} else if (arena.timer == 4) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-4");
|
||||
} else if (arena.timer == 3) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-3");
|
||||
} else if (arena.timer == 2) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-2");
|
||||
} else if (arena.timer == 1) {
|
||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 2);
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-1");
|
||||
if (arena.timer == 190 || arena.timer == 60 || arena.timer == 30 || arena.timer == 10) {
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-" + arena.timer);
|
||||
} else if (arena.timer <= 5) {
|
||||
World world = arena.lobbyWarp.getWorld();
|
||||
if (world != null) {
|
||||
int pitch = (int) (2 - Math.floor(arena.timer / 2.0));
|
||||
world.playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, pitch);
|
||||
}
|
||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||
}
|
||||
} else {
|
||||
ArenaHandler.hidersWin(arena);
|
||||
@ -448,7 +424,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
SignsHandler.updateSigns(); //TODO Only do this when needed (gamestate change or player count change)
|
||||
SignsHandler.updateSigns(); //TODO Only do this when needed (game-state change or player count change)
|
||||
}, 0, 20);
|
||||
}
|
||||
|
||||
@ -481,7 +457,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) {
|
||||
Player player = null;
|
||||
if (sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
@ -507,6 +483,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
int loc = argsSplit.length - i2 - 1;
|
||||
if (!argsSplit[loc].equalsIgnoreCase(args[loc]) && !argsSplitAlias[loc].equalsIgnoreCase(args[loc])) {
|
||||
equals = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -532,7 +509,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String[] args) {
|
||||
|
||||
for (CommandManager command : MemoryStorage.commands) {
|
||||
if (cmd.getName().equalsIgnoreCase(command.label)) {
|
||||
@ -548,13 +525,13 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
||||
/**
|
||||
* Short a String for like the Scoreboard title.
|
||||
*
|
||||
* @param string String to be shorten.
|
||||
* @param maxLenght Max lenght of the characters.
|
||||
* @param string String to be shortened.
|
||||
* @param maxLength Max length of the characters.
|
||||
* @return Shorten string, else normal string.
|
||||
*/
|
||||
public static String cutString(String string, int maxLenght) {
|
||||
if (string.length() > maxLenght) {
|
||||
string = string.substring(0, maxLenght);
|
||||
public static String cutString(String string, int maxLength) {
|
||||
if (string.length() > maxLength) {
|
||||
string = string.substring(0, maxLength);
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CMDcreate extends DefaultCMD {
|
||||
public class CMDCreate extends DefaultCMD {
|
||||
|
||||
@Override
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDcreate.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDCreate.usage);
|
||||
} else {
|
||||
if (MemoryStorage.pos1.get(player) != null && MemoryStorage.pos2.get(player) != null) {
|
||||
if (MemoryStorage.pos1.get(player).getWorld().equals(MemoryStorage.pos2.get(player).getWorld())) {
|
@ -20,7 +20,7 @@ import nl.Steffion.BlockHunt.MemoryStorage;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CMDhelp extends DefaultCMD {
|
||||
public class CMDHelp extends DefaultCMD {
|
||||
|
||||
|
||||
@Override
|
@ -17,7 +17,7 @@ import nl.Steffion.BlockHunt.Managers.MessageManager;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CMDinfo extends DefaultCMD {
|
||||
public class CMDInfo extends DefaultCMD {
|
||||
|
||||
|
||||
@Override
|
||||
@ -25,7 +25,7 @@ public class CMDinfo extends DefaultCMD {
|
||||
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-" + BlockHunt.pdfFile.getName());
|
||||
MessageManager.sendMessage(player, "%A%name%%N made by %A%authors%%N.", "name-" + BlockHunt.pdfFile.getName(), "authors-" + BlockHunt.pdfFile.getAuthors().get(0));
|
||||
MessageManager.sendMessage(player, "%NVersion: %A%version%%N.", "version-" + BlockHunt.pdfFile.getVersion());
|
||||
MessageManager.sendMessage(player, "%NType %A%helpusage% %Nfor help.", "helpusage-" + BlockHunt.CMDhelp.usage);
|
||||
MessageManager.sendMessage(player, "%NType %A%helpusage% %Nfor help.", "helpusage-" + BlockHunt.CMDHelp.usage);
|
||||
MessageManager.sendMessage(player, "%NDev-Page: %Ahttp://dev.bukkit.org/bukkit-plugins/blockhunt/");
|
||||
MessageManager.sendMessage(player, "%NDonations are welcome!");
|
||||
MessageManager.sendMessage(player, "%NMade by help from some friends &c<3%N!");
|
@ -7,13 +7,13 @@ import nl.Steffion.BlockHunt.Managers.MessageManager;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CMDjoin extends DefaultCMD {
|
||||
public class CMDJoin extends DefaultCMD {
|
||||
|
||||
@Override
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDjoin.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDJoin.usage);
|
||||
} else {
|
||||
ArenaHandler.playerJoinArena(player, args[1]);
|
||||
}
|
@ -25,7 +25,7 @@ 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);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDTokens.usage);
|
||||
} else {
|
||||
String option = args[1];
|
||||
String playerName = args[2];
|
||||
|
@ -18,7 +18,7 @@ public class CMDremove extends DefaultCMD {
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDremove.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDRemove.usage);
|
||||
} else {
|
||||
for (Arena arena : MemoryStorage.arenaList) {
|
||||
if (args[1].equalsIgnoreCase(arena.arenaName)) {
|
||||
|
@ -13,7 +13,7 @@ public class CMDset extends DefaultCMD {
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDset.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDSet.usage);
|
||||
} else {
|
||||
String arenaname = args[1];
|
||||
InventoryHandler.openPanel(player, arenaname);
|
||||
|
@ -16,7 +16,7 @@ public class CMDsetwarp extends DefaultCMD {
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 2) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDsetwarp.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDSetWarp.usage);
|
||||
} else {
|
||||
String arenaname = args[2];
|
||||
String warpname = args[1];
|
||||
|
@ -15,7 +15,7 @@ public class CMDstart extends DefaultCMD {
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDstart.usage);
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDStart.usage);
|
||||
} else {
|
||||
Arena arena = null;
|
||||
for (Arena arena2 : MemoryStorage.arenaList) {
|
||||
|
@ -115,10 +115,8 @@ public enum ConfigC {
|
||||
/**
|
||||
* Makes an object from the list above.
|
||||
*
|
||||
* @param value
|
||||
* Setting in the config file.
|
||||
* @param config
|
||||
* The config file.
|
||||
* @param value Setting in the config file.
|
||||
* @param config The config file.
|
||||
*/
|
||||
ConfigC(Object value, ConfigManager config) {
|
||||
this.value = value;
|
||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -32,7 +33,7 @@ public class EndArenaEvent extends Event {
|
||||
return arena;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JoinArenaEvent extends Event {
|
||||
|
||||
@ -24,7 +25,7 @@ public class JoinArenaEvent extends Event {
|
||||
return arena;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LeaveArenaEvent extends Event {
|
||||
|
||||
@ -24,7 +25,7 @@ public class LeaveArenaEvent extends Event {
|
||||
return arena;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
@ -132,42 +132,20 @@ public class InventoryHandler {
|
||||
UP_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.messages.get(ConfigC.button_add), "1-" + addremove, "2-" + option));
|
||||
UP.setItemMeta(UP_IM);
|
||||
|
||||
int setting = 0;
|
||||
switch (at) {
|
||||
case maxPlayers:
|
||||
setting = arena.maxPlayers;
|
||||
break;
|
||||
case minPlayers:
|
||||
setting = arena.minPlayers;
|
||||
break;
|
||||
case amountSeekersOnStart:
|
||||
setting = arena.amountSeekersOnStart;
|
||||
break;
|
||||
case timeInLobbyUntilStart:
|
||||
setting = arena.timeInLobbyUntilStart;
|
||||
break;
|
||||
case waitingTimeSeeker:
|
||||
setting = arena.waitingTimeSeeker;
|
||||
break;
|
||||
case gameTime:
|
||||
setting = arena.gameTime;
|
||||
break;
|
||||
case timeUntilHidersSword:
|
||||
setting = arena.timeUntilHidersSword;
|
||||
break;
|
||||
case blockAnnouncerTime:
|
||||
setting = arena.blockAnnouncerTime;
|
||||
break;
|
||||
case hidersTokenWin:
|
||||
setting = arena.hidersTokenWin;
|
||||
break;
|
||||
case seekersTokenWin:
|
||||
setting = arena.seekersTokenWin;
|
||||
break;
|
||||
case killTokens:
|
||||
setting = arena.killTokens;
|
||||
break;
|
||||
}
|
||||
int setting = switch (at) {
|
||||
case maxPlayers -> arena.maxPlayers;
|
||||
case minPlayers -> arena.minPlayers;
|
||||
case amountSeekersOnStart -> arena.amountSeekersOnStart;
|
||||
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart;
|
||||
case waitingTimeSeeker -> arena.waitingTimeSeeker;
|
||||
case gameTime -> arena.gameTime;
|
||||
case timeUntilHidersSword -> arena.timeUntilHidersSword;
|
||||
case blockAnnouncerTime -> arena.blockAnnouncerTime;
|
||||
case hidersTokenWin -> arena.hidersTokenWin;
|
||||
case seekersTokenWin -> arena.seekersTokenWin;
|
||||
case killTokens -> arena.killTokens;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
ItemMeta BUTTON_IM = BUTTON.getItemMeta();
|
||||
BUTTON_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.messages.get(ConfigC.button_setting), "1-" + option, "2-" + setting));
|
||||
|
@ -29,7 +29,7 @@ public class OnEntityDamageByEntityEvent implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
|
||||
if (!(event.getEntity() instanceof Player) || event.getEntity() == null) {
|
||||
if (!(event.getEntity() instanceof Player player) || event.getEntity() == null) {
|
||||
// We only care about player damage
|
||||
return;
|
||||
}
|
||||
@ -39,14 +39,12 @@ public class OnEntityDamageByEntityEvent implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player) event.getEntity();
|
||||
Player damager = null;
|
||||
if (event.getDamager() instanceof Player) {
|
||||
damager = (Player) event.getDamager();
|
||||
} else {
|
||||
if ((event.getCause() == DamageCause.PROJECTILE) && (event.getDamager() instanceof Arrow)) {
|
||||
if ((event.getCause() == DamageCause.PROJECTILE) && (event.getDamager() instanceof Arrow arrow)) {
|
||||
// If damage was caused by an arrow, find out who shot the arrow
|
||||
Arrow arrow = (Arrow) event.getDamager();
|
||||
ProjectileSource shooter = arrow.getShooter();
|
||||
if (shooter instanceof Player) {
|
||||
damager = (Player) shooter;
|
||||
|
@ -245,39 +245,17 @@ public class OnInventoryClickEvent implements Listener {
|
||||
if (item.getItemMeta().getDisplayName().contains((String) MemoryStorage.messages.get(ConfigC.button_add2))) {
|
||||
if (option < max) {
|
||||
switch (at) {
|
||||
case maxPlayers:
|
||||
arena.maxPlayers = option + add;
|
||||
break;
|
||||
case minPlayers:
|
||||
arena.minPlayers = option + add;
|
||||
break;
|
||||
case amountSeekersOnStart:
|
||||
arena.amountSeekersOnStart = option + add;
|
||||
break;
|
||||
case timeInLobbyUntilStart:
|
||||
arena.timeInLobbyUntilStart = option + add;
|
||||
break;
|
||||
case waitingTimeSeeker:
|
||||
arena.waitingTimeSeeker = option + add;
|
||||
break;
|
||||
case gameTime:
|
||||
arena.gameTime = option + add;
|
||||
break;
|
||||
case blockAnnouncerTime:
|
||||
arena.blockAnnouncerTime = option + add;
|
||||
break;
|
||||
case timeUntilHidersSword:
|
||||
arena.timeUntilHidersSword = option + add;
|
||||
break;
|
||||
case hidersTokenWin:
|
||||
arena.hidersTokenWin = option + add;
|
||||
break;
|
||||
case seekersTokenWin:
|
||||
arena.seekersTokenWin = option + add;
|
||||
break;
|
||||
case killTokens:
|
||||
arena.killTokens = option + add;
|
||||
break;
|
||||
case maxPlayers -> arena.maxPlayers = option + add;
|
||||
case minPlayers -> arena.minPlayers = option + add;
|
||||
case amountSeekersOnStart -> arena.amountSeekersOnStart = option + add;
|
||||
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart = option + add;
|
||||
case waitingTimeSeeker -> arena.waitingTimeSeeker = option + add;
|
||||
case gameTime -> arena.gameTime = option + add;
|
||||
case blockAnnouncerTime -> arena.blockAnnouncerTime = option + add;
|
||||
case timeUntilHidersSword -> arena.timeUntilHidersSword = option + add;
|
||||
case hidersTokenWin -> arena.hidersTokenWin = option + add;
|
||||
case seekersTokenWin -> arena.seekersTokenWin = option + add;
|
||||
case killTokens -> arena.killTokens = option + add;
|
||||
}
|
||||
} else {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_setTooHighNumber, "max-" + max);
|
||||
@ -285,39 +263,17 @@ public class OnInventoryClickEvent implements Listener {
|
||||
} else if (item.getItemMeta().getDisplayName().contains((String) MemoryStorage.messages.get(ConfigC.button_remove2))) {
|
||||
if (option > min) {
|
||||
switch (at) {
|
||||
case maxPlayers:
|
||||
arena.maxPlayers = option - remove;
|
||||
break;
|
||||
case minPlayers:
|
||||
arena.minPlayers = option - remove;
|
||||
break;
|
||||
case amountSeekersOnStart:
|
||||
arena.amountSeekersOnStart = option - remove;
|
||||
break;
|
||||
case timeInLobbyUntilStart:
|
||||
arena.timeInLobbyUntilStart = option - remove;
|
||||
break;
|
||||
case waitingTimeSeeker:
|
||||
arena.waitingTimeSeeker = option - remove;
|
||||
break;
|
||||
case gameTime:
|
||||
arena.gameTime = option - remove;
|
||||
break;
|
||||
case blockAnnouncerTime:
|
||||
arena.blockAnnouncerTime = option - remove;
|
||||
break;
|
||||
case timeUntilHidersSword:
|
||||
arena.timeUntilHidersSword = option - remove;
|
||||
break;
|
||||
case hidersTokenWin:
|
||||
arena.hidersTokenWin = option - remove;
|
||||
break;
|
||||
case seekersTokenWin:
|
||||
arena.seekersTokenWin = option - remove;
|
||||
break;
|
||||
case killTokens:
|
||||
arena.killTokens = option - remove;
|
||||
break;
|
||||
case maxPlayers -> arena.maxPlayers = option - remove;
|
||||
case minPlayers -> arena.minPlayers = option - remove;
|
||||
case amountSeekersOnStart -> arena.amountSeekersOnStart = option - remove;
|
||||
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart = option - remove;
|
||||
case waitingTimeSeeker -> arena.waitingTimeSeeker = option - remove;
|
||||
case gameTime -> arena.gameTime = option - remove;
|
||||
case blockAnnouncerTime -> arena.blockAnnouncerTime = option - remove;
|
||||
case timeUntilHidersSword -> arena.timeUntilHidersSword = option - remove;
|
||||
case hidersTokenWin -> arena.hidersTokenWin = option - remove;
|
||||
case seekersTokenWin -> arena.seekersTokenWin = option - remove;
|
||||
case killTokens -> arena.killTokens = option - remove;
|
||||
}
|
||||
} else {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_setTooLowNumber, "min-" + min);
|
||||
|
@ -26,7 +26,7 @@ public class OnPlayerMoveEvent implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
for (Arena arena : MemoryStorage.arenaList) {
|
||||
if (arena.playersInArena.contains(player)) {
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.gameState == ArenaState.IN_GAME) {
|
||||
MemoryStorage.moveLoc.put(player, player.getLocation());
|
||||
if (arena.pos1 == null || arena.pos2 == null) {
|
||||
BlockHunt.plugin.getLogger().info("Arena:" +
|
||||
|
@ -32,8 +32,7 @@ public class ConfigManager {
|
||||
/**
|
||||
* Use this class to create an automated config file.
|
||||
*
|
||||
* @param fileName
|
||||
* Name of the file.
|
||||
* @param fileName Name of the file.
|
||||
*/
|
||||
public ConfigManager(String fileName) {
|
||||
this.fileName = fileName;
|
||||
@ -48,10 +47,8 @@ public class ConfigManager {
|
||||
/**
|
||||
* Use this class to create an automated config file.
|
||||
*
|
||||
* @param fileName
|
||||
* Name of the file.
|
||||
* @param subdirectory
|
||||
* Sub-Location of the file.
|
||||
* @param fileName Name of the file.
|
||||
* @param subdirectory Sub-Location of the file.
|
||||
*/
|
||||
public ConfigManager(String fileName, String subdirectory) {
|
||||
this.fileName = fileName;
|
||||
@ -143,8 +140,7 @@ public class ConfigManager {
|
||||
/**
|
||||
* Get object from a Config.
|
||||
*
|
||||
* @param location
|
||||
* Config location.
|
||||
* @param location Config location.
|
||||
* @return Object
|
||||
*/
|
||||
public Object get(ConfigC location) {
|
||||
|
@ -23,8 +23,8 @@ public class MessageManager {
|
||||
* player's name.
|
||||
*
|
||||
* @param player The player receiving the message.
|
||||
* @param message Message which needs to be send to the player.
|
||||
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
|
||||
* @param message Message which needs to be sent to the player.
|
||||
* @param vars Variables. Separated with a - . Ex: "playerName-" +
|
||||
* player.getName();
|
||||
*/
|
||||
public static void sendMessage(Player player, String message, String... vars) {
|
||||
|
@ -20,7 +20,7 @@ public class PermissionsManager {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if an player has the permission. Also checks * related permissions.
|
||||
* Check if a player has the permission. Also checks * related permissions.
|
||||
* This permission DOES HAVE TO be registered.
|
||||
*
|
||||
* @param player The player who needs the permission.
|
||||
@ -72,7 +72,7 @@ public class PermissionsManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an player has the permission. Also checks * related permissions.
|
||||
* Check if a player has the permission. Also checks * related permissions.
|
||||
* This permission does NOT have to be registered.
|
||||
*
|
||||
* @param player The player who needs the permission.
|
||||
|
@ -35,7 +35,7 @@ public class ScoreboardHandler {
|
||||
Score hiders = object.getScore(temp);
|
||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.gameState == ArenaState.IN_GAME) {
|
||||
for (Player pl : arena.playersInArena) {
|
||||
pl.setScoreboard(board);
|
||||
}
|
||||
@ -65,7 +65,7 @@ public class ScoreboardHandler {
|
||||
Score hiders = object.getScore(temp);
|
||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
if (arena.gameState == ArenaState.IN_GAME) {
|
||||
for (Player pl : arena.playersInArena) {
|
||||
pl.setScoreboard(board);
|
||||
}
|
||||
|
@ -94,8 +94,7 @@ public class SignsHandler {
|
||||
|
||||
// check if that area is actually loaded. If not move on.
|
||||
if (loc.getWorld().isChunkLoaded(loc.getBlockX() >> 4, loc.getBlockZ() >> 4)) {
|
||||
if (loc.getBlock().getState() instanceof Sign) {
|
||||
Sign signblock = (Sign) loc.getBlock().getState();
|
||||
if (loc.getBlock().getState() instanceof Sign signblock) {
|
||||
String[] lines = signblock.getLines();
|
||||
if (sign.contains("leave")) {
|
||||
|
||||
@ -155,7 +154,7 @@ public class SignsHandler {
|
||||
}
|
||||
}
|
||||
signblock.update();
|
||||
} else if (arena.gameState.equals(ArenaState.INGAME)) {
|
||||
} else if (arena.gameState.equals(ArenaState.IN_GAME)) {
|
||||
ArrayList<String> signLines = (ArrayList<String>) MemoryStorage.config.getFile().getStringList(ConfigC.sign_INGAME.location);
|
||||
int linecount = 0;
|
||||
if (signLines != null) {
|
||||
|
@ -1,90 +1,90 @@
|
||||
log-enabledPlugin:'%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%authors%%N.'
|
||||
log-disabledPlugin:'%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||
info:'%NDisplays the plugin''s info.'
|
||||
help:'%NShows a list of commands.'
|
||||
reload:'%NReloads all configs.'
|
||||
join:'%NJoins a BlockHunt game.'
|
||||
leave:'%NLeave a BlockHunt game.'
|
||||
list:'%NShows a list of available arenas.'
|
||||
shop:'%NOpens the BlockHunt shop.'
|
||||
start:'%NForces an arena to start.'
|
||||
wand:'%NGives you the wand selection tool.'
|
||||
create:'%NCreates an arena from your selection.'
|
||||
set:'%NOpens a panel to set settings.'
|
||||
setwarp:'%NSets warps for your arena.'
|
||||
remove:'%NDeletes an Arena.'
|
||||
tokens:'%NChange someones tokens.'
|
||||
log-enabledPlugin='%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%authors%%N.'
|
||||
log-disabledPlugin='%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||
info='%NDisplays the plugin''s info.'
|
||||
help='%NShows a list of commands.'
|
||||
reload='%NReloads all configs.'
|
||||
join='%NJoins a BlockHunt game.'
|
||||
leave='%NLeave a BlockHunt game.'
|
||||
list='%NShows a list of available arenas.'
|
||||
shop='%NOpens the BlockHunt shop.'
|
||||
start='%NForces an arena to start.'
|
||||
wand='%NGives you the wand selection tool.'
|
||||
create='%NCreates an arena from your selection.'
|
||||
set='%NOpens a panel to set settings.'
|
||||
setwarp='%NSets warps for your arena.'
|
||||
remove='%NDeletes an Arena.'
|
||||
tokens='%NChange someones tokens.'
|
||||
#buttons
|
||||
button-add:'%NAdd %A%1%%N to %A%2%%N'
|
||||
button-add2:Add
|
||||
button-setting:'%NSetting %A%1%%N is now: %A%2%%N.'
|
||||
button-remove:'%NRemove %A%1%%N from %A%2%%N'
|
||||
button-remove2:Remove
|
||||
button-add='%NAdd %A%1%%N to %A%2%%N'
|
||||
button-add2=Add
|
||||
button-setting='%NSetting %A%1%%N is now: %A%2%%N.'
|
||||
button-remove='%NRemove %A%1%%N from %A%2%%N'
|
||||
button-remove2=Remove
|
||||
#Normal
|
||||
reloadedConfigs:'%TAG&aReloaded all configs!'
|
||||
joinJoinedArena:'%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||
leaveYouLeft:'%TAG%NYou left the arena! Thanks for playing!'
|
||||
leaveLeftArena:'%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||
startForced:'%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||
wandGaveWand:'%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
||||
wandSetPosition:'%TAG%NSet position %A#%number%%N to location: (%A%x%%N, %A%y%%N,%A%z%%N).'
|
||||
createCreatedArena:'%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||
lobbyArenaIsStarting:'%TAG%NThe arena will start in %A%1%%N second(s)!'
|
||||
lobbyArenaStarted:'%TAG%NThe arena has been started! The seeker is coming to find you in %A%secs%%N seconds!'
|
||||
ingameSeekerChoosen:'%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||
ingameBlock:'%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||
ingameArenaEnd:'%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||
ingameSeekerSpawned:'%TAG%A%playername%%N has spawned as a seeker!'
|
||||
ingameGivenSword:'%TAG%NYou were given a sword!'
|
||||
ingameHiderDied:'%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||
ingameHidersLeft:'%NHider(s) left: %A%left%%N'
|
||||
ingameSeekerDied:'%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||
winSeekers:'%TAG%NThe %ASEEKERS%N have won!'
|
||||
winHiders:'%TAG%NThe %AHIDERS%N have won!'
|
||||
setwarpWarpSet:'%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||
addedToken:'%TAG%A%amount%%N tokens were added to your account!'
|
||||
removeRemovedArena:'%TAG%NRemoved arena ''%A%name%%N''!'
|
||||
tokensChanged:'%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%N.'
|
||||
tokensChangedPerson:'%TAG%NPlayer %A%playername%%N %N%option% %A%amount%%N %option2% your tokens.'
|
||||
ingameNowSolid:'%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||
ingameNoMoreSolid:'%TAG%NYou''re no longer a solid block!'
|
||||
shopBoughtItem:'%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||
shopChoosenBlock:'%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
||||
shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
|
||||
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
|
||||
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
|
||||
reloadedConfigs='%TAG&aReloaded all configs!'
|
||||
joinJoinedArena='%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||
leaveYouLeft='%TAG%NYou left the arena! Thanks for playing!'
|
||||
leaveLeftArena='%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||
startForced='%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||
wandGaveWand='%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
||||
wandSetPosition='%TAG%NSet position %A#%number%%N to location: (%A%x%%N, %A%y%%N,%A%z%%N).'
|
||||
createCreatedArena='%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||
lobbyArenaIsStarting='%TAG%NThe arena will start in %A%1%%N second(s)!'
|
||||
lobbyArenaStarted='%TAG%NThe arena has been started! The seeker is coming to find you in %A%secs%%N seconds!'
|
||||
ingameSeekerChoosen='%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||
ingameBlock='%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||
ingameArenaEnd='%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||
ingameSeekerSpawned='%TAG%A%playername%%N has spawned as a seeker!'
|
||||
ingameGivenSword='%TAG%NYou were given a sword!'
|
||||
ingameHiderDied='%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||
ingameHidersLeft='%NHider(s) left: %A%left%%N'
|
||||
ingameSeekerDied='%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||
winSeekers='%TAG%NThe %ASEEKERS%N have won!'
|
||||
winHiders='%TAG%NThe %AHIDERS%N have won!'
|
||||
setwarpWarpSet='%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||
addedToken='%TAG%A%amount%%N tokens were added to your account!'
|
||||
removeRemovedArena='%TAG%NRemoved arena ''%A%name%%N''!'
|
||||
tokensChanged='%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%N.'
|
||||
tokensChangedPerson='%TAG%NPlayer %A%playername%%N %N%option% %A%amount%%N %option2% your tokens.'
|
||||
ingameNowSolid='%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||
ingameNoMoreSolid='%TAG%NYou''re no longer a solid block!'
|
||||
shopBoughtItem='%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||
shopChoosenBlock='%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
||||
shopChoosenSeeker='%TAG%NYou''ve choosen to be a %Aseeker%N!'
|
||||
shopChoosenHiders='%TAG%NYou''ve choosen to be a %Ahider%N!'
|
||||
ingameBlocksLeft='%TAG%NRemaining blocks: %A%1%%N'
|
||||
# Warnings
|
||||
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
|
||||
ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
|
||||
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
|
||||
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
|
||||
arenaStopped:'%TAG%WThe arena has been forced to stop!'
|
||||
error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
|
||||
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
|
||||
error-commandNotEnabled:'%TAG%EThis command has been disabled!'
|
||||
error-commandNotFound:'%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
||||
error-notEnoughArguments:'%TAG%EYou''re missing arguments, correct syntax: %A%syntax%'
|
||||
error-libsDisguisesNotInstalled:'%TAG%EThe plugin ''%ALib''s Disguises%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-protocolLibNotInstalled:'%TAG%EThe plugin ''%AProtocolLib%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-noArena:'%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||
error-onlyIngame:'%TAG%EThis is an only in-game command!'
|
||||
error-joinAlreadyJoined:'%TAG%EYou''ve already joined an arena!'
|
||||
error-joinNoBlocksSet:'%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
||||
error-joinWarpsNotSet:'%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||
error-joinArenaIngame:'%TAG%EThis game has already started.'
|
||||
error-joinFull:'%TAG%EUnable to join this arena. It''s full!'
|
||||
error-joinInventoryNotEmpty:'%TAG%EYour inventory should be empty before joining!'
|
||||
error-leaveNotInArena:'%TAG%EYou''re not in an arena!'
|
||||
error-createSelectionFirst:'%TAG%EMake a selection first. Use the wand command: %A/BlockHunt <wand|w>%E.'
|
||||
error-createNotSameWorld:'%TAG%EMake your selection points in the same world!'
|
||||
error-setTooHighNumber:'%TAG%EThat amount is too high! Max amount is: %A%max%%E.'
|
||||
error-setTooLowNumber:'%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||
error-setNotABlock:'%TAG%EThat is not a block!'
|
||||
error-setwarpWarpNotFound:'%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||
error-tokensPlayerNotOnline:'%TAG%ENo player found with the name ''%A%playername%%E''!'
|
||||
error-tokensUnknownsetting:'%TAG%E''%A%option%%E'' is not a known option!'
|
||||
error-shopNeedMoreTokens:'%TAG%EYou need more tokens before you can buy this item.'
|
||||
error-shopMaxSeekersReached:'%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||
error-shopMaxHidersReached:'%TAG%ESorry, the maximum amount of hiders has been reached!'
|
||||
error-teleportFailed:'%TAG%EUnable to teleport you into the arena.'
|
||||
error-teleportBlocked:'%TAG%EYou cannot teleport while playing!'
|
||||
lobbyNeedAtleast='%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
|
||||
ingameNEWSeekerChoosen='%TAG%WThe last seeker left and a new seeker has been choosen!'
|
||||
unableToCommand='%TAG%WSorry but that command is disabled in the arena.'
|
||||
ingameNoSolidPlace='%TAG%WThat''s not a valid place to become solid!'
|
||||
arenaStopped='%TAG%WThe arena has been forced to stop!'
|
||||
error-noPermission='%TAG%EYou don''t have the permissions to do that!'
|
||||
error-notANumber='%TAG%E''%A%1%%E'' is not a number!'
|
||||
error-commandNotEnabled='%TAG%EThis command has been disabled!'
|
||||
error-commandNotFound='%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
||||
error-notEnoughArguments='%TAG%EYou''re missing arguments, correct syntax: %A%syntax%'
|
||||
error-libsDisguisesNotInstalled='%TAG%EThe plugin ''%ALib''s Disguises%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-protocolLibNotInstalled='%TAG%EThe plugin ''%AProtocolLib%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-noArena='%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||
error-onlyIngame='%TAG%EThis is an only in-game command!'
|
||||
error-joinAlreadyJoined='%TAG%EYou''ve already joined an arena!'
|
||||
error-joinNoBlocksSet='%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
||||
error-joinWarpsNotSet='%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||
error-joinArenaIngame='%TAG%EThis game has already started.'
|
||||
error-joinFull='%TAG%EUnable to join this arena. It''s full!'
|
||||
error-joinInventoryNotEmpty='%TAG%EYour inventory should be empty before joining!'
|
||||
error-leaveNotInArena='%TAG%EYou''re not in an arena!'
|
||||
error-createSelectionFirst='%TAG%EMake a selection first. Use the wand command: %A/BlockHunt <wand|w>%E.'
|
||||
error-createNotSameWorld='%TAG%EMake your selection points in the same world!'
|
||||
error-setTooHighNumber='%TAG%EThat amount is too high! Max amount is: %A%max%%E.'
|
||||
error-setTooLowNumber='%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||
error-setNotABlock='%TAG%EThat is not a block!'
|
||||
error-setwarpWarpNotFound='%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||
error-tokensPlayerNotOnline='%TAG%ENo player found with the name ''%A%playername%%E''!'
|
||||
error-tokensUnknownsetting='%TAG%E''%A%option%%E'' is not a known option!'
|
||||
error-shopNeedMoreTokens='%TAG%EYou need more tokens before you can buy this item.'
|
||||
error-shopMaxSeekersReached='%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||
error-shopMaxHidersReached='%TAG%ESorry, the maximum amount of hiders has been reached!'
|
||||
error-teleportFailed='%TAG%EUnable to teleport you into the arena.'
|
||||
error-teleportBlocked='%TAG%EYou cannot teleport while playing!'
|
||||
|
@ -1,90 +1,90 @@
|
||||
log-enabledPlugin:'%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%authors%%N.'
|
||||
log-disabledPlugin:'%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||
info:'%NDisplays the plugin''s info.'
|
||||
help:'%NShows a list of commands.'
|
||||
reload:'%NReloads all configs.'
|
||||
join:'%NJoins a BlockHunt game.'
|
||||
leave:'%NLeave a BlockHunt game.'
|
||||
list:'%NShows a list of available arenas.'
|
||||
shop:'%NOpens the BlockHunt shop.'
|
||||
start:'%NForces an arena to start.'
|
||||
wand:'%NGives you the wand selection tool.'
|
||||
create:'%NCreates an arena from your selection.'
|
||||
set:'%NOpens a panel to set settings.'
|
||||
setwarp:'%NSets warps for your arena.'
|
||||
remove:'%NDeletes an Arena.'
|
||||
tokens:'%NChange someones tokens.'
|
||||
log-enabledPlugin='%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%authors%%N.'
|
||||
log-disabledPlugin='%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||
info='%NDisplays the plugin''s info.'
|
||||
help='%NShows a list of commands.'
|
||||
reload='%NReloads all configs.'
|
||||
join='%NJoins a BlockHunt game.'
|
||||
leave='%NLeave a BlockHunt game.'
|
||||
list='%NShows a list of available arenas.'
|
||||
shop='%NOpens the BlockHunt shop.'
|
||||
start='%NForces an arena to start.'
|
||||
wand='%NGives you the wand selection tool.'
|
||||
create='%NCreates an arena from your selection.'
|
||||
set='%NOpens a panel to set settings.'
|
||||
setwarp='%NSets warps for your arena.'
|
||||
remove='%NDeletes an Arena.'
|
||||
tokens='%NChange someones tokens.'
|
||||
#buttons
|
||||
button-add:'%NAdd %A%1%%N to %A%2%%N'
|
||||
button-add2:Add
|
||||
button-setting:'%NSetting %A%1%%N is now: %A%2%%N.'
|
||||
button-remove:'%NRemove %A%1%%N from %A%2%%N'
|
||||
button-remove2:Remove
|
||||
button-add='%NAdd %A%1%%N to %A%2%%N'
|
||||
button-add2=Add
|
||||
button-setting='%NSetting %A%1%%N is now: %A%2%%N.'
|
||||
button-remove='%NRemove %A%1%%N from %A%2%%N'
|
||||
button-remove2=Remove
|
||||
#Normal
|
||||
reloadedConfigs:'%TAG&aReloaded all configs!'
|
||||
joinJoinedArena:'%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||
leaveYouLeft:'%TAG%NYou left the arena! Thanks for playing!'
|
||||
leaveLeftArena:'%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||
startForced:'%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||
wandGaveWand:'%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
||||
wandSetPosition:'%TAG%NSet position %A#%number%%N to location: (%A%x%%N, %A%y%%N,%A%z%%N).'
|
||||
createCreatedArena:'%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||
lobbyArenaIsStarting:'%TAG%NThe arena will start in %A%1%%N second(s)!'
|
||||
lobbyArenaStarted:'%TAG%NThe arena has been started! The seeker is coming to find you in %A%secs%%N seconds!'
|
||||
ingameSeekerChoosen:'%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||
ingameBlock:'%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||
ingameArenaEnd:'%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||
ingameSeekerSpawned:'%TAG%A%playername%%N has spawned as a seeker!'
|
||||
ingameGivenSword:'%TAG%NYou were given a sword!'
|
||||
ingameHiderDied:'%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||
ingameHidersLeft:'%NHider(s) left: %A%left%%N'
|
||||
ingameSeekerDied:'%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||
winSeekers:'%TAG%NThe %ASEEKERS%N have won!'
|
||||
winHiders:'%TAG%NThe %AHIDERS%N have won!'
|
||||
setwarpWarpSet:'%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||
addedToken:'%TAG%A%amount%%N tokens were added to your account!'
|
||||
removeRemovedArena:'%TAG%NRemoved arena ''%A%name%%N''!'
|
||||
tokensChanged:'%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%N.'
|
||||
tokensChangedPerson:'%TAG%NPlayer %A%playername%%N %N%option% %A%amount%%N %option2% your tokens.'
|
||||
ingameNowSolid:'%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||
ingameNoMoreSolid:'%TAG%NYou''re no longer a solid block!'
|
||||
shopBoughtItem:'%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||
shopChoosenBlock:'%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
||||
shopChoosenSeeker:'%TAG%NYou''ve choosen to be a %Aseeker%N!'
|
||||
shopChoosenHiders:'%TAG%NYou''ve choosen to be a %Ahider%N!'
|
||||
ingameBlocksLeft:'%TAG%NRemaining blocks: %A%1%%N'
|
||||
reloadedConfigs='%TAG&aReloaded all configs!'
|
||||
joinJoinedArena='%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||
leaveYouLeft='%TAG%NYou left the arena! Thanks for playing!'
|
||||
leaveLeftArena='%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||
startForced='%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||
wandGaveWand='%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
||||
wandSetPosition='%TAG%NSet position %A#%number%%N to location: (%A%x%%N, %A%y%%N,%A%z%%N).'
|
||||
createCreatedArena='%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||
lobbyArenaIsStarting='%TAG%NThe arena will start in %A%1%%N second(s)!'
|
||||
lobbyArenaStarted='%TAG%NThe arena has been started! The seeker is coming to find you in %A%secs%%N seconds!'
|
||||
ingameSeekerChoosen='%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||
ingameBlock='%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||
ingameArenaEnd='%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||
ingameSeekerSpawned='%TAG%A%playername%%N has spawned as a seeker!'
|
||||
ingameGivenSword='%TAG%NYou were given a sword!'
|
||||
ingameHiderDied='%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||
ingameHidersLeft='%NHider(s) left: %A%left%%N'
|
||||
ingameSeekerDied='%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||
winSeekers='%TAG%NThe %ASEEKERS%N have won!'
|
||||
winHiders='%TAG%NThe %AHIDERS%N have won!'
|
||||
setwarpWarpSet='%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||
addedToken='%TAG%A%amount%%N tokens were added to your account!'
|
||||
removeRemovedArena='%TAG%NRemoved arena ''%A%name%%N''!'
|
||||
tokensChanged='%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%N.'
|
||||
tokensChangedPerson='%TAG%NPlayer %A%playername%%N %N%option% %A%amount%%N %option2% your tokens.'
|
||||
ingameNowSolid='%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||
ingameNoMoreSolid='%TAG%NYou''re no longer a solid block!'
|
||||
shopBoughtItem='%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||
shopChoosenBlock='%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
||||
shopChoosenSeeker='%TAG%NYou''ve choosen to be a %Aseeker%N!'
|
||||
shopChoosenHiders='%TAG%NYou''ve choosen to be a %Ahider%N!'
|
||||
ingameBlocksLeft='%TAG%NRemaining blocks: %A%1%%N'
|
||||
# Warnings
|
||||
lobbyNeedAtleast:'%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
|
||||
ingameNEWSeekerChoosen:'%TAG%WThe last seeker left and a new seeker has been choosen!'
|
||||
unableToCommand:'%TAG%WSorry but that command is disabled in the arena.'
|
||||
ingameNoSolidPlace:'%TAG%WThat''s not a valid place to become solid!'
|
||||
arenaStopped:'%TAG%WThe arena has been forced to stop!'
|
||||
error-noPermission:'%TAG%EYou don''t have the permissions to do that!'
|
||||
error-notANumber:'%TAG%E''%A%1%%E'' is not a number!'
|
||||
error-commandNotEnabled:'%TAG%EThis command has been disabled!'
|
||||
error-commandNotFound:'%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
||||
error-notEnoughArguments:'%TAG%EYou''re missing arguments, correct syntax: %A%syntax%'
|
||||
error-libsDisguisesNotInstalled:'%TAG%EThe plugin ''%ALib''s Disguises%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-protocolLibNotInstalled:'%TAG%EThe plugin ''%AProtocolLib%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-noArena:'%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||
error-onlyIngame:'%TAG%EThis is an only in-game command!'
|
||||
error-joinAlreadyJoined:'%TAG%EYou''ve already joined an arena!'
|
||||
error-joinNoBlocksSet:'%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
||||
error-joinWarpsNotSet:'%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||
error-joinArenaIngame:'%TAG%EThis game has already started.'
|
||||
error-joinFull:'%TAG%EUnable to join this arena. It''s full!'
|
||||
error-joinInventoryNotEmpty:'%TAG%EYour inventory should be empty before joining!'
|
||||
error-leaveNotInArena:'%TAG%EYou''re not in an arena!'
|
||||
error-createSelectionFirst:'%TAG%EMake a selection first. Use the wand command: %A/BlockHunt <wand|w>%E.'
|
||||
error-createNotSameWorld:'%TAG%EMake your selection points in the same world!'
|
||||
error-setTooHighNumber:'%TAG%EThat amount is too high! Max amount is: %A%max%%E.'
|
||||
error-setTooLowNumber:'%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||
error-setNotABlock:'%TAG%EThat is not a block!'
|
||||
error-setwarpWarpNotFound:'%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||
error-tokensPlayerNotOnline:'%TAG%ENo player found with the name ''%A%playername%%E''!'
|
||||
error-tokensUnknownsetting:'%TAG%E''%A%option%%E'' is not a known option!'
|
||||
error-shopNeedMoreTokens:'%TAG%EYou need more tokens before you can buy this item.'
|
||||
error-shopMaxSeekersReached:'%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||
error-shopMaxHidersReached:'%TAG%ESorry, the maximum amount of hiders has been reached!'
|
||||
error-teleportFailed:'%TAG%EUnable to teleport you into the arena.'
|
||||
error-teleportBlocked:'%TAG%EYou cannot teleport while playing!'
|
||||
lobbyNeedAtleast='%TAG%WYou need atleast %A%1%%W player(s) to start the game!'
|
||||
ingameNEWSeekerChoosen='%TAG%WThe last seeker left and a new seeker has been choosen!'
|
||||
unableToCommand='%TAG%WSorry but that command is disabled in the arena.'
|
||||
ingameNoSolidPlace='%TAG%WThat''s not a valid place to become solid!'
|
||||
arenaStopped='%TAG%WThe arena has been forced to stop!'
|
||||
error-noPermission='%TAG%EYou don''t have the permissions to do that!'
|
||||
error-notANumber='%TAG%E''%A%1%%E'' is not a number!'
|
||||
error-commandNotEnabled='%TAG%EThis command has been disabled!'
|
||||
error-commandNotFound='%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
||||
error-notEnoughArguments='%TAG%EYou''re missing arguments, correct syntax: %A%syntax%'
|
||||
error-libsDisguisesNotInstalled='%TAG%EThe plugin ''%ALib''s Disguises%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-protocolLibNotInstalled='%TAG%EThe plugin ''%AProtocolLib%E'' is required to run this plugin! Intall it or it won''t work!'
|
||||
error-noArena='%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||
error-onlyIngame='%TAG%EThis is an only in-game command!'
|
||||
error-joinAlreadyJoined='%TAG%EYou''ve already joined an arena!'
|
||||
error-joinNoBlocksSet='%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
||||
error-joinWarpsNotSet='%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||
error-joinArenaIngame='%TAG%EThis game has already started.'
|
||||
error-joinFull='%TAG%EUnable to join this arena. It''s full!'
|
||||
error-joinInventoryNotEmpty='%TAG%EYour inventory should be empty before joining!'
|
||||
error-leaveNotInArena='%TAG%EYou''re not in an arena!'
|
||||
error-createSelectionFirst='%TAG%EMake a selection first. Use the wand command: %A/BlockHunt <wand|w>%E.'
|
||||
error-createNotSameWorld='%TAG%EMake your selection points in the same world!'
|
||||
error-setTooHighNumber='%TAG%EThat amount is too high! Max amount is: %A%max%%E.'
|
||||
error-setTooLowNumber='%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||
error-setNotABlock='%TAG%EThat is not a block!'
|
||||
error-setwarpWarpNotFound='%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||
error-tokensPlayerNotOnline='%TAG%ENo player found with the name ''%A%playername%%E''!'
|
||||
error-tokensUnknownsetting='%TAG%E''%A%option%%E'' is not a known option!'
|
||||
error-shopNeedMoreTokens='%TAG%EYou need more tokens before you can buy this item.'
|
||||
error-shopMaxSeekersReached='%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||
error-shopMaxHidersReached='%TAG%ESorry, the maximum amount of hiders has been reached!'
|
||||
error-teleportFailed='%TAG%EUnable to teleport you into the arena.'
|
||||
error-teleportBlocked='%TAG%EYou cannot teleport while playing!'
|
||||
|
Loading…
Reference in New Issue
Block a user