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!
|
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 committing use the following symbols:
|
||||||
|
|
||||||
*
|
*
|
||||||
+ For new features/code.
|
+ 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
|
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
|
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
|
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
|
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
|
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
|
5: False Reports - Adding false issues to this page will only make our lives more difficult, if you're going to troll
|
||||||
do it on someone else's plugin because personally that is the last thing on my mind.
|
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
|
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
|
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
|
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.
|
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
|
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
|
||||||
don't need to be reported.
|
need to be reported.
|
||||||
|
|
||||||
Thank you,
|
Thank you,
|
||||||
|
|
||||||
|
6
pom.xml
6
pom.xml
@ -83,6 +83,12 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains</groupId>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<version>RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.configuration.serialization.SerializableAs;
|
|||||||
import org.bukkit.entity.Player;
|
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 org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -106,13 +107,13 @@ public class Arena implements ConfigurationSerializable {
|
|||||||
public enum ArenaState {
|
public enum ArenaState {
|
||||||
WAITING,
|
WAITING,
|
||||||
STARTING,
|
STARTING,
|
||||||
INGAME,
|
IN_GAME,
|
||||||
RESTARTING,
|
RESTARTING,
|
||||||
DISABLED
|
DISABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> serialize() {
|
public @NotNull Map<String, Object> serialize() {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("arenaName", arenaName);
|
map.put("arenaName", arenaName);
|
||||||
map.put("pos1", pos1);
|
map.put("pos1", pos1);
|
||||||
@ -144,7 +145,7 @@ public class Arena implements ConfigurationSerializable {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({"unchecked", "unused"})
|
||||||
public static Arena deserialize(Map<String, Object> map) {
|
public static Arena deserialize(Map<String, Object> map) {
|
||||||
Location loc = new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0);
|
Location loc = new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0);
|
||||||
return new Arena(
|
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 found = false;
|
||||||
boolean alreadyJoined = false;
|
boolean alreadyJoined = false;
|
||||||
for (Arena arena : MemoryStorage.arenaList) {
|
for (Arena arena : MemoryStorage.arenaList) {
|
||||||
@ -62,29 +62,29 @@ public class ArenaHandler {
|
|||||||
|
|
||||||
if (!alreadyJoined) {
|
if (!alreadyJoined) {
|
||||||
for (Arena arena : MemoryStorage.arenaList) {
|
for (Arena arena : MemoryStorage.arenaList) {
|
||||||
if (arena.arenaName.equalsIgnoreCase(arenaname)) {
|
if (arena.arenaName.equalsIgnoreCase(arenaName)) {
|
||||||
found = true;
|
found = true;
|
||||||
if (arena.disguiseBlocks.isEmpty()) {
|
if (arena.disguiseBlocks.isEmpty()) {
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_joinNoBlocksSet);
|
MessageManager.sendFMessage(player, ConfigC.error_joinNoBlocksSet);
|
||||||
} else {
|
} else {
|
||||||
boolean inventoryempty = true;
|
boolean inventoryEmpty = true;
|
||||||
for (ItemStack invitem : player.getInventory()) {
|
for (ItemStack inventoryItem : player.getInventory()) {
|
||||||
if (invitem != null) {
|
if (inventoryItem != null) {
|
||||||
if (invitem.getType() != Material.AIR) {
|
if (inventoryItem.getType() != Material.AIR) {
|
||||||
inventoryempty = false;
|
inventoryEmpty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ItemStack invitem : player.getInventory().getArmorContents()) {
|
for (ItemStack inventoryItem : player.getInventory().getArmorContents()) {
|
||||||
if (invitem != null) {
|
if (inventoryItem != null) {
|
||||||
if (invitem.getType() != Material.AIR) {
|
if (inventoryItem.getType() != Material.AIR) {
|
||||||
inventoryempty = false;
|
inventoryEmpty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Boolean) MemoryStorage.config.get(ConfigC.requireInventoryClearOnJoin) && !inventoryempty) {
|
if ((Boolean) MemoryStorage.config.get(ConfigC.requireInventoryClearOnJoin) && !inventoryEmpty) {
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_joinInventoryNotEmpty);
|
MessageManager.sendFMessage(player, ConfigC.error_joinInventoryNotEmpty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ public class ArenaHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("[BlockHunt] " + player.getName() + " has joined " + arenaname);
|
System.out.println("[BlockHunt] " + player.getName() + " has joined " + arenaName);
|
||||||
arena.playersInArena.add(player);
|
arena.playersInArena.add(player);
|
||||||
JoinArenaEvent event = new JoinArenaEvent(player, arena);
|
JoinArenaEvent event = new JoinArenaEvent(player, arena);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
@ -137,18 +137,18 @@ 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
|
||||||
@ -163,12 +163,12 @@ public class ArenaHandler {
|
|||||||
ItemStack shopBlockChooser = new ItemStack(Material.getMaterial((String) MemoryStorage.config.get(ConfigC.shop_blockChooserv1IDname)), 1);
|
ItemStack shopBlockChooser = new ItemStack(Material.getMaterial((String) MemoryStorage.config.get(ConfigC.shop_blockChooserv1IDname)), 1);
|
||||||
ItemMeta shopBlockChooser_IM = shopBlockChooser.getItemMeta();
|
ItemMeta shopBlockChooser_IM = shopBlockChooser.getItemMeta();
|
||||||
shopBlockChooser_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_blockChooserv1Name)));
|
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> loreStrings = MemoryStorage.config.getFile().getStringList(ConfigC.shop_blockChooserv1Description.location);
|
||||||
List<String> lores2 = new ArrayList<>();
|
List<String> loreStrings2 = new ArrayList<>();
|
||||||
for (String lore : lores) {
|
for (String lore : loreStrings) {
|
||||||
lores2.add(MessageManager.replaceAll(lore));
|
loreStrings2.add(MessageManager.replaceAll(lore));
|
||||||
}
|
}
|
||||||
shopBlockChooser_IM.setLore(lores2);
|
shopBlockChooser_IM.setLore(loreStrings2);
|
||||||
shopBlockChooser.setItemMeta(shopBlockChooser_IM);
|
shopBlockChooser.setItemMeta(shopBlockChooser_IM);
|
||||||
|
|
||||||
player.getInventory().addItem(shopBlockChooser);
|
player.getInventory().addItem(shopBlockChooser);
|
||||||
@ -181,13 +181,13 @@ public class ArenaHandler {
|
|||||||
1);
|
1);
|
||||||
ItemMeta shopBlockHuntPass_IM = shopBlockHuntPass.getItemMeta();
|
ItemMeta shopBlockHuntPass_IM = shopBlockHuntPass.getItemMeta();
|
||||||
shopBlockHuntPass_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)));
|
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> loreStrings = MemoryStorage.config.getFile().getStringList(ConfigC.shop_BlockHuntPassv2Description.location);
|
||||||
List<String> lores2 = new ArrayList<>();
|
List<String> loreStrings2 = new ArrayList<>();
|
||||||
for (String lore : lores) {
|
for (String lore : loreStrings) {
|
||||||
lores2.add(MessageManager.replaceAll(lore));
|
loreStrings2.add(MessageManager.replaceAll(lore));
|
||||||
}
|
}
|
||||||
|
|
||||||
shopBlockHuntPass_IM.setLore(lores2);
|
shopBlockHuntPass_IM.setLore(loreStrings2);
|
||||||
shopBlockHuntPass.setItemMeta(shopBlockHuntPass_IM);
|
shopBlockHuntPass.setItemMeta(shopBlockHuntPass_IM);
|
||||||
shopBlockHuntPass.setAmount(MemoryStorage.shop.getFile().getInt(player.getName() + ".blockhuntpass"));
|
shopBlockHuntPass.setAmount(MemoryStorage.shop.getFile().getInt(player.getName() + ".blockhuntpass"));
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public class ArenaHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_noArena, "name-" + arenaname);
|
MessageManager.sendFMessage(player, ConfigC.error_noArena, "name-" + arenaName);
|
||||||
}
|
}
|
||||||
|
|
||||||
SignsHandler.updateSigns();
|
SignsHandler.updateSigns();
|
||||||
@ -256,7 +256,7 @@ public class ArenaHandler {
|
|||||||
ArenaHandler.sendFMessage(arena, ConfigC.warning_lobbyNeedAtleast, "1-" + arena.minPlayers);
|
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()) {
|
if (arena.seekers.size() >= arena.playersInArena.size()) {
|
||||||
ArenaHandler.seekersWin(arena);
|
ArenaHandler.seekersWin(arena);
|
||||||
} else {
|
} else {
|
||||||
@ -268,7 +268,7 @@ public class ArenaHandler {
|
|||||||
ArenaHandler.seekersWin(arena);
|
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()));
|
Player seeker = arena.playersInArena.get(MemoryStorage.random.nextInt(arena.playersInArena.size()));
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.warning_ingameNEWSeekerChoosen, "seeker-" + seeker.getName());
|
ArenaHandler.sendFMessage(arena, ConfigC.warning_ingameNEWSeekerChoosen, "seeker-" + seeker.getName());
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameSeekerChoosen, "seeker-" + seeker.getName());
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameSeekerChoosen, "seeker-" + seeker.getName());
|
||||||
@ -283,14 +283,14 @@ public class ArenaHandler {
|
|||||||
seeker.setWalkSpeed(0.3F);
|
seeker.setWalkSpeed(0.3F);
|
||||||
|
|
||||||
// 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
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@ 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.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.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.CMDleave;
|
||||||
import nl.Steffion.BlockHunt.Commands.CMDlist;
|
import nl.Steffion.BlockHunt.Commands.CMDlist;
|
||||||
import nl.Steffion.BlockHunt.Commands.CMDnotfound;
|
import nl.Steffion.BlockHunt.Commands.CMDnotfound;
|
||||||
@ -45,6 +45,7 @@ import org.bukkit.GameMode;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -56,6 +57,7 @@ import org.bukkit.event.Listener;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
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 org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -77,7 +79,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
public static BlockHunt plugin;
|
public static BlockHunt plugin;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public static final List<String> BlockHuntCMD = new ArrayList<String>() {
|
public static final List<String> BlockHuntCMD = new ArrayList<>() {
|
||||||
{
|
{
|
||||||
add("info");
|
add("info");
|
||||||
add("help");
|
add("help");
|
||||||
@ -97,20 +99,20 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static CommandManager CMD;
|
public static CommandManager CMD;
|
||||||
public static CommandManager CMDinfo;
|
public static CommandManager CMDInfo;
|
||||||
public static CommandManager CMDhelp;
|
public static CommandManager CMDHelp;
|
||||||
public static CommandManager CMDreload;
|
public static CommandManager CMDReload;
|
||||||
public static CommandManager CMDjoin;
|
public static CommandManager CMDJoin;
|
||||||
public static CommandManager CMDleave;
|
public static CommandManager CMDLeave;
|
||||||
public static CommandManager CMDlist;
|
public static CommandManager CMDList;
|
||||||
public static CommandManager CMDshop;
|
public static CommandManager CMDShop;
|
||||||
public static CommandManager CMDstart;
|
public static CommandManager CMDStart;
|
||||||
public static CommandManager CMDwand;
|
public static CommandManager CMDWand;
|
||||||
public static CommandManager CMDcreate;
|
public static CommandManager CMDCreate;
|
||||||
public static CommandManager CMDset;
|
public static CommandManager CMDSet;
|
||||||
public static CommandManager CMDsetwarp;
|
public static CommandManager CMDSetWarp;
|
||||||
public static CommandManager CMDremove;
|
public static CommandManager CMDRemove;
|
||||||
public static CommandManager CMDtokens;
|
public static CommandManager CMDTokens;
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
getServer().getPluginManager().registerEvents(this, this);
|
getServer().getPluginManager().registerEvents(this, this);
|
||||||
@ -139,36 +141,36 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
ConfigManager.newFiles();
|
ConfigManager.newFiles();
|
||||||
|
|
||||||
CMD = new CommandManager("BlockHunt", "BlockHunt", null, null, Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info), BlockHuntCMD,
|
CMD = new CommandManager("BlockHunt", "BlockHunt", null, null, Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info), BlockHuntCMD,
|
||||||
new CMDinfo(), null);
|
new CMDInfo(), null);
|
||||||
CMDinfo = new CommandManager("BlockHunt INFO", "BlockHunt", "info", "i", Permissions.info, ConfigC.help_info, (Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_info),
|
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]");
|
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),
|
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]");
|
BlockHuntCMD, new CMDHelp(), "/BlockHunt <help|h> [page number]");
|
||||||
CMDreload = new CommandManager("BlockHunt RELOAD", "BlockHunt", "reload", "r", Permissions.reload, ConfigC.help_reload,
|
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>");
|
(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),
|
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>");
|
BlockHuntCMD, new CMDJoin(), "/BlockHunt <join|j> <arena name>");
|
||||||
CMDleave = new CommandManager("BlockHunt LEAVE", "BlockHunt", "leave", "l", Permissions.leave, ConfigC.help_leave,
|
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>");
|
(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>");
|
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>");
|
BlockHuntCMD, new CMDshop(), "/BlockHunt <shop|sh>");
|
||||||
CMDstart = new CommandManager("BlockHunt START", "BlockHunt", "start", "go", Permissions.start, ConfigC.help_start,
|
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>");
|
(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),
|
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>");
|
BlockHuntCMD, new CMDwand(), "/BlockHunt <wand|w>");
|
||||||
CMDcreate = new CommandManager("BlockHunt CREATE", "BlockHunt", "create", "c", Permissions.create, ConfigC.help_create,
|
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>");
|
(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),
|
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>");
|
BlockHuntCMD, new CMDset(), "/BlockHunt <set|s> <arena name>");
|
||||||
CMDsetwarp = new CommandManager("BlockHunt SETWARP", "BlockHunt", "setwarp", "sw", Permissions.setwarp, ConfigC.help_setwarp,
|
CMDSetWarp = new CommandManager("BlockHunt SETWARP", "BlockHunt", "setwarp", "sw", Permissions.setwarp, ConfigC.help_setwarp,
|
||||||
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_setwarp), BlockHuntCMD, new CMDsetwarp(),
|
(Boolean) MemoryStorage.config.get(ConfigC.commandEnabled_setwarp), BlockHuntCMD, new CMDsetwarp(),
|
||||||
"/BlockHunt <setwarp|sw> <lobby|hiders|seekers|spawn> <arenaname>");
|
"/BlockHunt <setwarp|sw> <lobby|hiders|seekers|spawn> <arena name>");
|
||||||
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> <arena name>");
|
||||||
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> <player name> <amount>");
|
||||||
|
|
||||||
if (!getServer().getPluginManager().isPluginEnabled("LibsDisguises")) {
|
if (!getServer().getPluginManager().isPluginEnabled("LibsDisguises")) {
|
||||||
MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled);
|
MessageManager.broadcastFMessage(ConfigC.error_libsDisguisesNotInstalled);
|
||||||
@ -199,30 +201,18 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
} else if (arena.gameState == ArenaState.STARTING) {
|
} else if (arena.gameState == ArenaState.STARTING) {
|
||||||
arena.timer = arena.timer - 1;
|
arena.timer = arena.timer - 1;
|
||||||
if (arena.timer > 0) {
|
if (arena.timer > 0) {
|
||||||
if (arena.timer == 60) {
|
if (arena.timer == 60 || arena.timer == 30 || arena.timer == 10) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-60");
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||||
} else if (arena.timer == 30) {
|
} else if (arena.timer <= 5) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-30");
|
World world = arena.lobbyWarp.getWorld();
|
||||||
} else if (arena.timer == 10) {
|
if (world != null) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-10");
|
int pitch = (int) (2 - Math.floor(arena.timer / 2.0));
|
||||||
} else if (arena.timer == 5) {
|
world.playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, pitch);
|
||||||
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
|
}
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-5");
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||||
} 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");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
arena.gameState = ArenaState.INGAME;
|
arena.gameState = ArenaState.IN_GAME;
|
||||||
arena.timer = arena.gameTime;
|
arena.timer = arena.gameTime;
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaStarted, "secs-" + arena.waitingTimeSeeker);
|
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;
|
arena.timer = arena.timer - 1;
|
||||||
if (arena.timer > 0) {
|
if (arena.timer > 0) {
|
||||||
if (arena.timer == arena.gameTime - arena.timeUntilHidersSword) {
|
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);
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameBlocksLeft, "1-" + blocklist);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arena.timer == 190) {
|
if (arena.timer == 190 || arena.timer == 60 || arena.timer == 30 || arena.timer == 10) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-190");
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-" + arena.timer);
|
||||||
} else if (arena.timer == 60) {
|
} else if (arena.timer <= 5) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-60");
|
World world = arena.lobbyWarp.getWorld();
|
||||||
} else if (arena.timer == 30) {
|
if (world != null) {
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-30");
|
int pitch = (int) (2 - Math.floor(arena.timer / 2.0));
|
||||||
} else if (arena.timer == 10) {
|
world.playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, pitch);
|
||||||
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-10");
|
}
|
||||||
} else if (arena.timer == 5) {
|
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-" + arena.timer);
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ArenaHandler.hidersWin(arena);
|
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);
|
}, 0, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,7 +457,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
Player player = null;
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
player = (Player) sender;
|
player = (Player) sender;
|
||||||
@ -507,6 +483,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
int loc = argsSplit.length - i2 - 1;
|
int loc = argsSplit.length - i2 - 1;
|
||||||
if (!argsSplit[loc].equalsIgnoreCase(args[loc]) && !argsSplitAlias[loc].equalsIgnoreCase(args[loc])) {
|
if (!argsSplit[loc].equalsIgnoreCase(args[loc]) && !argsSplitAlias[loc].equalsIgnoreCase(args[loc])) {
|
||||||
equals = false;
|
equals = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -532,7 +509,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
for (CommandManager command : MemoryStorage.commands) {
|
||||||
if (cmd.getName().equalsIgnoreCase(command.label)) {
|
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.
|
* Short a String for like the Scoreboard title.
|
||||||
*
|
*
|
||||||
* @param string String to be shorten.
|
* @param string String to be shortened.
|
||||||
* @param maxLenght Max lenght of the characters.
|
* @param maxLength Max length 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 maxLength) {
|
||||||
if (string.length() > maxLenght) {
|
if (string.length() > maxLength) {
|
||||||
string = string.substring(0, maxLenght);
|
string = string.substring(0, maxLength);
|
||||||
}
|
}
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
@ -13,13 +13,13 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class CMDcreate extends DefaultCMD {
|
public class CMDCreate extends DefaultCMD {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 1) {
|
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 {
|
} else {
|
||||||
if (MemoryStorage.pos1.get(player) != null && MemoryStorage.pos2.get(player) != null) {
|
if (MemoryStorage.pos1.get(player) != null && MemoryStorage.pos2.get(player) != null) {
|
||||||
if (MemoryStorage.pos1.get(player).getWorld().equals(MemoryStorage.pos2.get(player).getWorld())) {
|
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.command.Command;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class CMDhelp extends DefaultCMD {
|
public class CMDHelp extends DefaultCMD {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -17,7 +17,7 @@ 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;
|
||||||
|
|
||||||
public class CMDinfo extends DefaultCMD {
|
public class CMDInfo extends DefaultCMD {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,7 +25,7 @@ public class CMDinfo extends DefaultCMD {
|
|||||||
MessageManager.sendFMessage(player, ConfigC.chat_headerhigh, "header-" + BlockHunt.pdfFile.getName());
|
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, "%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, "%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, "%NDev-Page: %Ahttp://dev.bukkit.org/bukkit-plugins/blockhunt/");
|
||||||
MessageManager.sendMessage(player, "%NDonations are welcome!");
|
MessageManager.sendMessage(player, "%NDonations are welcome!");
|
||||||
MessageManager.sendMessage(player, "%NMade by help from some friends &c<3%N!");
|
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.command.Command;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class CMDjoin extends DefaultCMD {
|
public class CMDJoin extends DefaultCMD {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 1) {
|
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 {
|
} else {
|
||||||
ArenaHandler.playerJoinArena(player, args[1]);
|
ArenaHandler.playerJoinArena(player, args[1]);
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ public class CMDTokens extends DefaultCMD {
|
|||||||
@Override
|
@Override
|
||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (args.length <= 3) {
|
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 {
|
} else {
|
||||||
String option = args[1];
|
String option = args[1];
|
||||||
String playerName = args[2];
|
String playerName = args[2];
|
||||||
|
@ -18,7 +18,7 @@ public class CMDremove extends DefaultCMD {
|
|||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 1) {
|
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 {
|
} else {
|
||||||
for (Arena arena : MemoryStorage.arenaList) {
|
for (Arena arena : MemoryStorage.arenaList) {
|
||||||
if (args[1].equalsIgnoreCase(arena.arenaName)) {
|
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) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 1) {
|
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 {
|
} else {
|
||||||
String arenaname = args[1];
|
String arenaname = args[1];
|
||||||
InventoryHandler.openPanel(player, arenaname);
|
InventoryHandler.openPanel(player, arenaname);
|
||||||
|
@ -16,7 +16,7 @@ public class CMDsetwarp extends DefaultCMD {
|
|||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 2) {
|
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 {
|
} else {
|
||||||
String arenaname = args[2];
|
String arenaname = args[2];
|
||||||
String warpname = args[1];
|
String warpname = args[1];
|
||||||
|
@ -15,7 +15,7 @@ public class CMDstart extends DefaultCMD {
|
|||||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (args.length <= 1) {
|
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 {
|
} else {
|
||||||
Arena arena = null;
|
Arena arena = null;
|
||||||
for (Arena arena2 : MemoryStorage.arenaList) {
|
for (Arena arena2 : MemoryStorage.arenaList) {
|
||||||
|
@ -115,10 +115,8 @@ public enum ConfigC {
|
|||||||
/**
|
/**
|
||||||
* Makes an object from the list above.
|
* Makes an object from the list above.
|
||||||
*
|
*
|
||||||
* @param value
|
* @param value Setting in the config file.
|
||||||
* Setting in the config file.
|
* @param config The config file.
|
||||||
* @param config
|
|
||||||
* The config file.
|
|
||||||
*/
|
*/
|
||||||
ConfigC(Object value, ConfigManager config) {
|
ConfigC(Object value, ConfigManager config) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ public class EndArenaEvent extends Event {
|
|||||||
return arena;
|
return arena;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public @NotNull HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class JoinArenaEvent extends Event {
|
public class JoinArenaEvent extends Event {
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ public class JoinArenaEvent extends Event {
|
|||||||
return arena;
|
return arena;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public @NotNull HandlerList getHandlers() {
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import nl.Steffion.BlockHunt.Arena;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class LeaveArenaEvent extends Event {
|
public class LeaveArenaEvent extends Event {
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ public class LeaveArenaEvent extends Event {
|
|||||||
return arena;
|
return arena;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerList getHandlers() {
|
public @NotNull HandlerList getHandlers() {
|
||||||
return handlers;
|
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_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.messages.get(ConfigC.button_add), "1-" + addremove, "2-" + option));
|
||||||
UP.setItemMeta(UP_IM);
|
UP.setItemMeta(UP_IM);
|
||||||
|
|
||||||
int setting = 0;
|
int setting = switch (at) {
|
||||||
switch (at) {
|
case maxPlayers -> arena.maxPlayers;
|
||||||
case maxPlayers:
|
case minPlayers -> arena.minPlayers;
|
||||||
setting = arena.maxPlayers;
|
case amountSeekersOnStart -> arena.amountSeekersOnStart;
|
||||||
break;
|
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart;
|
||||||
case minPlayers:
|
case waitingTimeSeeker -> arena.waitingTimeSeeker;
|
||||||
setting = arena.minPlayers;
|
case gameTime -> arena.gameTime;
|
||||||
break;
|
case timeUntilHidersSword -> arena.timeUntilHidersSword;
|
||||||
case amountSeekersOnStart:
|
case blockAnnouncerTime -> arena.blockAnnouncerTime;
|
||||||
setting = arena.amountSeekersOnStart;
|
case hidersTokenWin -> arena.hidersTokenWin;
|
||||||
break;
|
case seekersTokenWin -> arena.seekersTokenWin;
|
||||||
case timeInLobbyUntilStart:
|
case killTokens -> arena.killTokens;
|
||||||
setting = arena.timeInLobbyUntilStart;
|
default -> 0;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemMeta BUTTON_IM = BUTTON.getItemMeta();
|
ItemMeta BUTTON_IM = BUTTON.getItemMeta();
|
||||||
BUTTON_IM.setDisplayName(MessageManager.replaceAll((String) MemoryStorage.messages.get(ConfigC.button_setting), "1-" + option, "2-" + setting));
|
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)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
|
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
|
// We only care about player damage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -39,14 +39,12 @@ public class OnEntityDamageByEntityEvent implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) event.getEntity();
|
|
||||||
Player damager = null;
|
Player damager = null;
|
||||||
if (event.getDamager() instanceof Player) {
|
if (event.getDamager() instanceof Player) {
|
||||||
damager = (Player) event.getDamager();
|
damager = (Player) event.getDamager();
|
||||||
} else {
|
} 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
|
// If damage was caused by an arrow, find out who shot the arrow
|
||||||
Arrow arrow = (Arrow) event.getDamager();
|
|
||||||
ProjectileSource shooter = arrow.getShooter();
|
ProjectileSource shooter = arrow.getShooter();
|
||||||
if (shooter instanceof Player) {
|
if (shooter instanceof Player) {
|
||||||
damager = (Player) shooter;
|
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 (item.getItemMeta().getDisplayName().contains((String) MemoryStorage.messages.get(ConfigC.button_add2))) {
|
||||||
if (option < max) {
|
if (option < max) {
|
||||||
switch (at) {
|
switch (at) {
|
||||||
case maxPlayers:
|
case maxPlayers -> arena.maxPlayers = option + add;
|
||||||
arena.maxPlayers = option + add;
|
case minPlayers -> arena.minPlayers = option + add;
|
||||||
break;
|
case amountSeekersOnStart -> arena.amountSeekersOnStart = option + add;
|
||||||
case minPlayers:
|
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart = option + add;
|
||||||
arena.minPlayers = option + add;
|
case waitingTimeSeeker -> arena.waitingTimeSeeker = option + add;
|
||||||
break;
|
case gameTime -> arena.gameTime = option + add;
|
||||||
case amountSeekersOnStart:
|
case blockAnnouncerTime -> arena.blockAnnouncerTime = option + add;
|
||||||
arena.amountSeekersOnStart = option + add;
|
case timeUntilHidersSword -> arena.timeUntilHidersSword = option + add;
|
||||||
break;
|
case hidersTokenWin -> arena.hidersTokenWin = option + add;
|
||||||
case timeInLobbyUntilStart:
|
case seekersTokenWin -> arena.seekersTokenWin = option + add;
|
||||||
arena.timeInLobbyUntilStart = option + add;
|
case killTokens -> arena.killTokens = 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;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_setTooHighNumber, "max-" + max);
|
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))) {
|
} else if (item.getItemMeta().getDisplayName().contains((String) MemoryStorage.messages.get(ConfigC.button_remove2))) {
|
||||||
if (option > min) {
|
if (option > min) {
|
||||||
switch (at) {
|
switch (at) {
|
||||||
case maxPlayers:
|
case maxPlayers -> arena.maxPlayers = option - remove;
|
||||||
arena.maxPlayers = option - remove;
|
case minPlayers -> arena.minPlayers = option - remove;
|
||||||
break;
|
case amountSeekersOnStart -> arena.amountSeekersOnStart = option - remove;
|
||||||
case minPlayers:
|
case timeInLobbyUntilStart -> arena.timeInLobbyUntilStart = option - remove;
|
||||||
arena.minPlayers = option - remove;
|
case waitingTimeSeeker -> arena.waitingTimeSeeker = option - remove;
|
||||||
break;
|
case gameTime -> arena.gameTime = option - remove;
|
||||||
case amountSeekersOnStart:
|
case blockAnnouncerTime -> arena.blockAnnouncerTime = option - remove;
|
||||||
arena.amountSeekersOnStart = option - remove;
|
case timeUntilHidersSword -> arena.timeUntilHidersSword = option - remove;
|
||||||
break;
|
case hidersTokenWin -> arena.hidersTokenWin = option - remove;
|
||||||
case timeInLobbyUntilStart:
|
case seekersTokenWin -> arena.seekersTokenWin = option - remove;
|
||||||
arena.timeInLobbyUntilStart = option - remove;
|
case killTokens -> arena.killTokens = 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;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_setTooLowNumber, "min-" + min);
|
MessageManager.sendFMessage(player, ConfigC.error_setTooLowNumber, "min-" + min);
|
||||||
|
@ -26,7 +26,7 @@ public class OnPlayerMoveEvent implements Listener {
|
|||||||
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)) {
|
||||||
if (arena.gameState == ArenaState.INGAME) {
|
if (arena.gameState == ArenaState.IN_GAME) {
|
||||||
MemoryStorage.moveLoc.put(player, player.getLocation());
|
MemoryStorage.moveLoc.put(player, player.getLocation());
|
||||||
if (arena.pos1 == null || arena.pos2 == null) {
|
if (arena.pos1 == null || arena.pos2 == null) {
|
||||||
BlockHunt.plugin.getLogger().info("Arena:" +
|
BlockHunt.plugin.getLogger().info("Arena:" +
|
||||||
|
@ -32,8 +32,7 @@ public class ConfigManager {
|
|||||||
/**
|
/**
|
||||||
* Use this class to create an automated config file.
|
* Use this class to create an automated config file.
|
||||||
*
|
*
|
||||||
* @param fileName
|
* @param fileName Name of the file.
|
||||||
* Name of the file.
|
|
||||||
*/
|
*/
|
||||||
public ConfigManager(String fileName) {
|
public ConfigManager(String fileName) {
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
@ -48,10 +47,8 @@ public class ConfigManager {
|
|||||||
/**
|
/**
|
||||||
* Use this class to create an automated config file.
|
* Use this class to create an automated config file.
|
||||||
*
|
*
|
||||||
* @param fileName
|
* @param fileName Name of the file.
|
||||||
* Name of the file.
|
* @param subdirectory Sub-Location of the file.
|
||||||
* @param subdirectory
|
|
||||||
* Sub-Location of the file.
|
|
||||||
*/
|
*/
|
||||||
public ConfigManager(String fileName, String subdirectory) {
|
public ConfigManager(String fileName, String subdirectory) {
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
@ -143,8 +140,7 @@ public class ConfigManager {
|
|||||||
/**
|
/**
|
||||||
* Get object from a Config.
|
* Get object from a Config.
|
||||||
*
|
*
|
||||||
* @param location
|
* @param location Config location.
|
||||||
* Config location.
|
|
||||||
* @return Object
|
* @return Object
|
||||||
*/
|
*/
|
||||||
public Object get(ConfigC location) {
|
public Object get(ConfigC location) {
|
||||||
|
@ -23,8 +23,8 @@ public class MessageManager {
|
|||||||
* player's name.
|
* player's name.
|
||||||
*
|
*
|
||||||
* @param player The player receiving the message.
|
* @param player The player receiving the message.
|
||||||
* @param message Message which needs to be send to the player.
|
* @param message Message which needs to be sent to the player.
|
||||||
* @param vars Variables. Seperated with a - . Ex: "playerName-" +
|
* @param vars Variables. Separated 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) {
|
||||||
|
@ -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.
|
* This permission DOES HAVE TO be registered.
|
||||||
*
|
*
|
||||||
* @param player The player who needs the permission.
|
* @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.
|
* This permission does NOT have to be registered.
|
||||||
*
|
*
|
||||||
* @param player The player who needs the permission.
|
* @param player The player who needs the permission.
|
||||||
|
@ -35,7 +35,7 @@ public class ScoreboardHandler {
|
|||||||
Score hiders = object.getScore(temp);
|
Score hiders = object.getScore(temp);
|
||||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||||
|
|
||||||
if (arena.gameState == ArenaState.INGAME) {
|
if (arena.gameState == ArenaState.IN_GAME) {
|
||||||
for (Player pl : arena.playersInArena) {
|
for (Player pl : arena.playersInArena) {
|
||||||
pl.setScoreboard(board);
|
pl.setScoreboard(board);
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ public class ScoreboardHandler {
|
|||||||
Score hiders = object.getScore(temp);
|
Score hiders = object.getScore(temp);
|
||||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||||
|
|
||||||
if (arena.gameState == ArenaState.INGAME) {
|
if (arena.gameState == ArenaState.IN_GAME) {
|
||||||
for (Player pl : arena.playersInArena) {
|
for (Player pl : arena.playersInArena) {
|
||||||
pl.setScoreboard(board);
|
pl.setScoreboard(board);
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,7 @@ public class SignsHandler {
|
|||||||
|
|
||||||
// check if that area is actually loaded. If not move on.
|
// check if that area is actually loaded. If not move on.
|
||||||
if (loc.getWorld().isChunkLoaded(loc.getBlockX() >> 4, loc.getBlockZ() >> 4)) {
|
if (loc.getWorld().isChunkLoaded(loc.getBlockX() >> 4, loc.getBlockZ() >> 4)) {
|
||||||
if (loc.getBlock().getState() instanceof Sign) {
|
if (loc.getBlock().getState() instanceof Sign signblock) {
|
||||||
Sign signblock = (Sign) loc.getBlock().getState();
|
|
||||||
String[] lines = signblock.getLines();
|
String[] lines = signblock.getLines();
|
||||||
if (sign.contains("leave")) {
|
if (sign.contains("leave")) {
|
||||||
|
|
||||||
@ -155,7 +154,7 @@ public class SignsHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
signblock.update();
|
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);
|
ArrayList<String> signLines = (ArrayList<String>) MemoryStorage.config.getFile().getStringList(ConfigC.sign_INGAME.location);
|
||||||
int linecount = 0;
|
int linecount = 0;
|
||||||
if (signLines != null) {
|
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-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.'
|
log-disabledPlugin='%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||||
info:'%NDisplays the plugin''s info.'
|
info='%NDisplays the plugin''s info.'
|
||||||
help:'%NShows a list of commands.'
|
help='%NShows a list of commands.'
|
||||||
reload:'%NReloads all configs.'
|
reload='%NReloads all configs.'
|
||||||
join:'%NJoins a BlockHunt game.'
|
join='%NJoins a BlockHunt game.'
|
||||||
leave:'%NLeave a BlockHunt game.'
|
leave='%NLeave a BlockHunt game.'
|
||||||
list:'%NShows a list of available arenas.'
|
list='%NShows a list of available arenas.'
|
||||||
shop:'%NOpens the BlockHunt shop.'
|
shop='%NOpens the BlockHunt shop.'
|
||||||
start:'%NForces an arena to start.'
|
start='%NForces an arena to start.'
|
||||||
wand:'%NGives you the wand selection tool.'
|
wand='%NGives you the wand selection tool.'
|
||||||
create:'%NCreates an arena from your selection.'
|
create='%NCreates an arena from your selection.'
|
||||||
set:'%NOpens a panel to set settings.'
|
set='%NOpens a panel to set settings.'
|
||||||
setwarp:'%NSets warps for your arena.'
|
setwarp='%NSets warps for your arena.'
|
||||||
remove:'%NDeletes an Arena.'
|
remove='%NDeletes an Arena.'
|
||||||
tokens:'%NChange someones tokens.'
|
tokens='%NChange someones tokens.'
|
||||||
#buttons
|
#buttons
|
||||||
button-add:'%NAdd %A%1%%N to %A%2%%N'
|
button-add='%NAdd %A%1%%N to %A%2%%N'
|
||||||
button-add2:Add
|
button-add2=Add
|
||||||
button-setting:'%NSetting %A%1%%N is now: %A%2%%N.'
|
button-setting='%NSetting %A%1%%N is now: %A%2%%N.'
|
||||||
button-remove:'%NRemove %A%1%%N from %A%2%%N'
|
button-remove='%NRemove %A%1%%N from %A%2%%N'
|
||||||
button-remove2:Remove
|
button-remove2=Remove
|
||||||
#Normal
|
#Normal
|
||||||
reloadedConfigs:'%TAG&aReloaded all configs!'
|
reloadedConfigs='%TAG&aReloaded all configs!'
|
||||||
joinJoinedArena:'%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
joinJoinedArena='%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||||
leaveYouLeft:'%TAG%NYou left the arena! Thanks for playing!'
|
leaveYouLeft='%TAG%NYou left the arena! Thanks for playing!'
|
||||||
leaveLeftArena:'%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
leaveLeftArena='%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||||
startForced:'%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
startForced='%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||||
wandGaveWand:'%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
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).'
|
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''.'
|
createCreatedArena='%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||||
lobbyArenaIsStarting:'%TAG%NThe arena will start in %A%1%%N second(s)!'
|
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!'
|
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!'
|
ingameSeekerChoosen='%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||||
ingameBlock:'%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
ingameBlock='%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||||
ingameArenaEnd:'%TAG%NThe arena will end in %A%1%%N second(s)!'
|
ingameArenaEnd='%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||||
ingameSeekerSpawned:'%TAG%A%playername%%N has spawned as a seeker!'
|
ingameSeekerSpawned='%TAG%A%playername%%N has spawned as a seeker!'
|
||||||
ingameGivenSword:'%TAG%NYou were given a sword!'
|
ingameGivenSword='%TAG%NYou were given a sword!'
|
||||||
ingameHiderDied:'%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
ingameHiderDied='%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||||
ingameHidersLeft:'%NHider(s) left: %A%left%%N'
|
ingameHidersLeft='%NHider(s) left: %A%left%%N'
|
||||||
ingameSeekerDied:'%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
ingameSeekerDied='%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||||
winSeekers:'%TAG%NThe %ASEEKERS%N have won!'
|
winSeekers='%TAG%NThe %ASEEKERS%N have won!'
|
||||||
winHiders:'%TAG%NThe %AHIDERS%N have won!'
|
winHiders='%TAG%NThe %AHIDERS%N have won!'
|
||||||
setwarpWarpSet:'%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
setwarpWarpSet='%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||||
addedToken:'%TAG%A%amount%%N tokens were added to your account!'
|
addedToken='%TAG%A%amount%%N tokens were added to your account!'
|
||||||
removeRemovedArena:'%TAG%NRemoved arena ''%A%name%%N''!'
|
removeRemovedArena='%TAG%NRemoved arena ''%A%name%%N''!'
|
||||||
tokensChanged:'%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%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.'
|
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!'
|
ingameNowSolid='%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||||
ingameNoMoreSolid:'%TAG%NYou''re no longer a solid block!'
|
ingameNoMoreSolid='%TAG%NYou''re no longer a solid block!'
|
||||||
shopBoughtItem:'%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
shopBoughtItem='%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||||
shopChoosenBlock:'%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
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!'
|
||||||
error-commandNotFound:'%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
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-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-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-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-noArena='%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||||
error-onlyIngame:'%TAG%EThis is an only in-game command!'
|
error-onlyIngame='%TAG%EThis is an only in-game command!'
|
||||||
error-joinAlreadyJoined:'%TAG%EYou''ve already joined an arena!'
|
error-joinAlreadyJoined='%TAG%EYou''ve already joined an arena!'
|
||||||
error-joinNoBlocksSet:'%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
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-joinWarpsNotSet='%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||||
error-joinArenaIngame:'%TAG%EThis game has already started.'
|
error-joinArenaIngame='%TAG%EThis game has already started.'
|
||||||
error-joinFull:'%TAG%EUnable to join this arena. It''s full!'
|
error-joinFull='%TAG%EUnable to join this arena. It''s full!'
|
||||||
error-joinInventoryNotEmpty:'%TAG%EYour inventory should be empty before joining!'
|
error-joinInventoryNotEmpty='%TAG%EYour inventory should be empty before joining!'
|
||||||
error-leaveNotInArena:'%TAG%EYou''re not in an arena!'
|
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-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-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-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-setTooLowNumber='%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||||
error-setNotABlock:'%TAG%EThat is not a block!'
|
error-setNotABlock='%TAG%EThat is not a block!'
|
||||||
error-setwarpWarpNotFound:'%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
error-setwarpWarpNotFound='%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||||
error-tokensPlayerNotOnline:'%TAG%ENo player found with the name ''%A%playername%%E''!'
|
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-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-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-shopMaxSeekersReached='%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||||
error-shopMaxHidersReached:'%TAG%ESorry, the maximum amount of hiders 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-teleportFailed='%TAG%EUnable to teleport you into the arena.'
|
||||||
error-teleportBlocked:'%TAG%EYou cannot teleport while playing!'
|
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-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.'
|
log-disabledPlugin='%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%authors%%N.'
|
||||||
info:'%NDisplays the plugin''s info.'
|
info='%NDisplays the plugin''s info.'
|
||||||
help:'%NShows a list of commands.'
|
help='%NShows a list of commands.'
|
||||||
reload:'%NReloads all configs.'
|
reload='%NReloads all configs.'
|
||||||
join:'%NJoins a BlockHunt game.'
|
join='%NJoins a BlockHunt game.'
|
||||||
leave:'%NLeave a BlockHunt game.'
|
leave='%NLeave a BlockHunt game.'
|
||||||
list:'%NShows a list of available arenas.'
|
list='%NShows a list of available arenas.'
|
||||||
shop:'%NOpens the BlockHunt shop.'
|
shop='%NOpens the BlockHunt shop.'
|
||||||
start:'%NForces an arena to start.'
|
start='%NForces an arena to start.'
|
||||||
wand:'%NGives you the wand selection tool.'
|
wand='%NGives you the wand selection tool.'
|
||||||
create:'%NCreates an arena from your selection.'
|
create='%NCreates an arena from your selection.'
|
||||||
set:'%NOpens a panel to set settings.'
|
set='%NOpens a panel to set settings.'
|
||||||
setwarp:'%NSets warps for your arena.'
|
setwarp='%NSets warps for your arena.'
|
||||||
remove:'%NDeletes an Arena.'
|
remove='%NDeletes an Arena.'
|
||||||
tokens:'%NChange someones tokens.'
|
tokens='%NChange someones tokens.'
|
||||||
#buttons
|
#buttons
|
||||||
button-add:'%NAdd %A%1%%N to %A%2%%N'
|
button-add='%NAdd %A%1%%N to %A%2%%N'
|
||||||
button-add2:Add
|
button-add2=Add
|
||||||
button-setting:'%NSetting %A%1%%N is now: %A%2%%N.'
|
button-setting='%NSetting %A%1%%N is now: %A%2%%N.'
|
||||||
button-remove:'%NRemove %A%1%%N from %A%2%%N'
|
button-remove='%NRemove %A%1%%N from %A%2%%N'
|
||||||
button-remove2:Remove
|
button-remove2=Remove
|
||||||
#Normal
|
#Normal
|
||||||
reloadedConfigs:'%TAG&aReloaded all configs!'
|
reloadedConfigs='%TAG&aReloaded all configs!'
|
||||||
joinJoinedArena:'%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
joinJoinedArena='%TAG%A%playername%%N joined your arena. (%A%1%%N/%A%2%%N)'
|
||||||
leaveYouLeft:'%TAG%NYou left the arena! Thanks for playing!'
|
leaveYouLeft='%TAG%NYou left the arena! Thanks for playing!'
|
||||||
leaveLeftArena:'%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
leaveLeftArena='%TAG%A%playername%%N left your arena. (%A%1%%N/%A%2%%N)'
|
||||||
startForced:'%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
startForced='%TAG%NYou forced to start arena ''%A%arenaname%%N''!'
|
||||||
wandGaveWand:'%TAG%NHere you go! &o(Use the %A&o%type%%N&o!)'
|
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).'
|
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''.'
|
createCreatedArena='%TAG%NCreated an arena with the name ''%A%name%%N''.'
|
||||||
lobbyArenaIsStarting:'%TAG%NThe arena will start in %A%1%%N second(s)!'
|
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!'
|
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!'
|
ingameSeekerChoosen='%TAG%NPlayer %A%seeker%%N has been choosen as seeker!'
|
||||||
ingameBlock:'%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
ingameBlock='%TAG%NYou''re disguised as a(n) ''%A%block%%N'' block.'
|
||||||
ingameArenaEnd:'%TAG%NThe arena will end in %A%1%%N second(s)!'
|
ingameArenaEnd='%TAG%NThe arena will end in %A%1%%N second(s)!'
|
||||||
ingameSeekerSpawned:'%TAG%A%playername%%N has spawned as a seeker!'
|
ingameSeekerSpawned='%TAG%A%playername%%N has spawned as a seeker!'
|
||||||
ingameGivenSword:'%TAG%NYou were given a sword!'
|
ingameGivenSword='%TAG%NYou were given a sword!'
|
||||||
ingameHiderDied:'%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
ingameHiderDied='%TAG%NHider %A%playername%%N was killed by %A%killer%%N!'
|
||||||
ingameHidersLeft:'%NHider(s) left: %A%left%%N'
|
ingameHidersLeft='%NHider(s) left: %A%left%%N'
|
||||||
ingameSeekerDied:'%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
ingameSeekerDied='%TAG%NSeeker %A%playername%%N died and will respawn in %A%secs%%N seconds!'
|
||||||
winSeekers:'%TAG%NThe %ASEEKERS%N have won!'
|
winSeekers='%TAG%NThe %ASEEKERS%N have won!'
|
||||||
winHiders:'%TAG%NThe %AHIDERS%N have won!'
|
winHiders='%TAG%NThe %AHIDERS%N have won!'
|
||||||
setwarpWarpSet:'%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
setwarpWarpSet='%TAG%NSet warp ''%A%warp%%N'' to your location!'
|
||||||
addedToken:'%TAG%A%amount%%N tokens were added to your account!'
|
addedToken='%TAG%A%amount%%N tokens were added to your account!'
|
||||||
removeRemovedArena:'%TAG%NRemoved arena ''%A%name%%N''!'
|
removeRemovedArena='%TAG%NRemoved arena ''%A%name%%N''!'
|
||||||
tokensChanged:'%TAG%N%option% %A%amount%%N tokens %option2% %A%playername%%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.'
|
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!'
|
ingameNowSolid='%TAG%NYou''re now a solid ''%A%block%%N'' block!'
|
||||||
ingameNoMoreSolid:'%TAG%NYou''re no longer a solid block!'
|
ingameNoMoreSolid='%TAG%NYou''re no longer a solid block!'
|
||||||
shopBoughtItem:'%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
shopBoughtItem='%TAG%NYou''ve bought the ''%A%itemname%%N'' item!'
|
||||||
shopChoosenBlock:'%TAG%NYou''ve choosen to be a(n) ''%A%block%%N'' block!'
|
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!'
|
||||||
error-commandNotFound:'%TAG%ECouldn''t find the command. Try %A/BlockHunt help %Efor more info.'
|
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-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-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-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-noArena='%TAG%ENo arena found with the name ''%A%name%%E''.'
|
||||||
error-onlyIngame:'%TAG%EThis is an only in-game command!'
|
error-onlyIngame='%TAG%EThis is an only in-game command!'
|
||||||
error-joinAlreadyJoined:'%TAG%EYou''ve already joined an arena!'
|
error-joinAlreadyJoined='%TAG%EYou''ve already joined an arena!'
|
||||||
error-joinNoBlocksSet:'%TAG%EThere are none blocks set for this arena. Notify the administrator.'
|
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-joinWarpsNotSet='%TAG%EThere are no warps set for this arena. Notify the administrator.'
|
||||||
error-joinArenaIngame:'%TAG%EThis game has already started.'
|
error-joinArenaIngame='%TAG%EThis game has already started.'
|
||||||
error-joinFull:'%TAG%EUnable to join this arena. It''s full!'
|
error-joinFull='%TAG%EUnable to join this arena. It''s full!'
|
||||||
error-joinInventoryNotEmpty:'%TAG%EYour inventory should be empty before joining!'
|
error-joinInventoryNotEmpty='%TAG%EYour inventory should be empty before joining!'
|
||||||
error-leaveNotInArena:'%TAG%EYou''re not in an arena!'
|
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-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-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-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-setTooLowNumber='%TAG%EThat amount is too low! Minimal amount is: %A%min%%E.'
|
||||||
error-setNotABlock:'%TAG%EThat is not a block!'
|
error-setNotABlock='%TAG%EThat is not a block!'
|
||||||
error-setwarpWarpNotFound:'%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
error-setwarpWarpNotFound='%TAG%EWarp ''%A%warp%%E'' is not valid!'
|
||||||
error-tokensPlayerNotOnline:'%TAG%ENo player found with the name ''%A%playername%%E''!'
|
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-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-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-shopMaxSeekersReached='%TAG%ESorry, the maximum amount of seekers has been reached!'
|
||||||
error-shopMaxHidersReached:'%TAG%ESorry, the maximum amount of hiders 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-teleportFailed='%TAG%EUnable to teleport you into the arena.'
|
||||||
error-teleportBlocked:'%TAG%EYou cannot teleport while playing!'
|
error-teleportBlocked='%TAG%EYou cannot teleport while playing!'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user