From bb3ea0115dc8e7f4e2a6a91e4824d3a22ae5b9d5 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Thu, 26 Nov 2015 20:41:42 +0000 Subject: [PATCH] fixed classes not loading --- .../game/clans/clans/ClansManager.java | 2 +- .../clans/clans/regions/ClansRegions.java | 22 ++++++++++++++++--- .../game/classcombat/Class/ClientClass.java | 5 ++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index ff3194f8c..1a2ac938e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -941,7 +941,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati { event.setResult(PlayerLoginEvent.Result.KICK_OTHER); // event.setKickMessage("This server is whitelisted!"); - event.setKickMessage("Please do not join anymore. It causes spam. Thank you.");//Clans is currently in staff only Pre-Alpha!"); + event.setKickMessage("PClans is currently in staff only Pre-Alpha!"); } else if (UtilServer.getPlayers().length >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted()) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java index 31639b7f4..3a3fb6315 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java @@ -1,20 +1,37 @@ package mineplex.game.clans.clans.regions; +import java.util.ArrayList; import java.util.HashSet; +import java.util.Iterator; +import java.util.List; import java.util.Set; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.World; import org.bukkit.WorldBorder; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerMoveEvent; +import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.plugin.java.JavaPlugin; +import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder; + import mineplex.core.MiniPlugin; import mineplex.core.common.util.Callback; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilWorld; import mineplex.game.clans.clans.ClanInfo; +import mineplex.game.clans.clans.ClansDataAccessLayer; import mineplex.game.clans.clans.ClansManager; import mineplex.game.clans.spawn.Spawn; import mineplex.minecraft.game.classcombat.Skill.event.SkillTeleportEvent; @@ -50,10 +67,9 @@ public class ClansRegions extends MiniPlugin // Initialize Spawn faction and claims claimArea("Spawn", SPAWN_RADIUS, 0, false, true, new Location[]{Spawn.getEastSpawn(), Spawn.getWestSpawn()}); - - claimArea("Shops", SHOP_RADIUS, 1, false, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()}); + claimArea("Shops", SHOP_RADIUS, 0, true, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()}); - + // Initialize Fields and Borderlands factions and claims claimArea("Fields", FIELDS_RADIUS, 0, false, true, worldCenter); claimArea("Borderlands", BORDERLANDS_RADIUS, 32, false, true, worldCenter); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClientClass.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClientClass.java index aee8e5b48..795407387 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClientClass.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Class/ClientClass.java @@ -148,7 +148,10 @@ public class ClientClass if (slotToken.Material.isEmpty()) continue; - itemTokenUsage += _itemFactory.GetItem(slotToken.Name.equalsIgnoreCase("Cobweb") ? "Web" : slotToken.Name).getTokenCost(); + if (_itemFactory.GetItem(slotToken.Name.equalsIgnoreCase("Cobweb") ? "Web" : slotToken.Name) != null) + { + itemTokenUsage += _itemFactory.GetItem(slotToken.Name.equalsIgnoreCase("Cobweb") ? "Web" : slotToken.Name).getTokenCost(); + } } itemTokenUsage += buildToken.ItemTokens;