diff --git a/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java index 8679dec3e..95837a935 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java @@ -98,10 +98,10 @@ public class InventoryRepository extends RepositoryBase public boolean incrementClientInventoryItem(int accountId, int itemId, int count) { - System.out.println("Updating " + accountId + "'s " + itemId + " with " + count); + //System.out.println("Updating " + accountId + "'s " + itemId + " with " + count); if (executeUpdate(UPDATE_CLIENT_INVENTORY, new ColumnInt("count", count), new ColumnInt("id", accountId), new ColumnInt("itemid", itemId)) < 1) { - System.out.println("Inserting " + accountId + "'s " + itemId + " with " + count); + //System.out.println("Inserting " + accountId + "'s " + itemId + " with " + count); return executeUpdate(INSERT_CLIENT_INVENTORY, new ColumnInt("id", accountId), new ColumnInt("itemid", itemId), new ColumnInt("count", count)) > 0; } else diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java index 14cc7e19d..c465dbf1d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java @@ -54,6 +54,7 @@ public class GameTeam } private String _name; + private String _displayName; private ChatColor _color; private HashMap _players = new HashMap(); @@ -75,6 +76,7 @@ public class GameTeam { Host = host; + _displayName = name; _name = name; _color = color; _spawns = spawns; @@ -139,7 +141,7 @@ public class GameTeam { _players.put(player, in ? PlayerState.IN : PlayerState.OUT); - UtilPlayer.message(player, F.main("Team", _color + C.Bold + "You joined " + _name + " Team.")); + UtilPlayer.message(player, F.main("Team", _color + C.Bold + "You joined " + _displayName + " Team.")); VisibilityManager.Instance.refreshPlayerToAll(player); } @@ -147,7 +149,7 @@ public class GameTeam public void DisbandTeam() { for (Player player : _players.keySet()) - UtilPlayer.message(player, F.main("Team", _color + C.Bold + _name + " Team was disbanded.")); + UtilPlayer.message(player, F.main("Team", _color + C.Bold + _displayName + " Team was disbanded.")); _players.clear(); } @@ -269,6 +271,11 @@ public class GameTeam { _name = name; } + + public void setDisplayName(String name) + { + _displayName = name; + } public byte GetColorData() { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java index c68d81109..a1f29df6a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java @@ -100,7 +100,7 @@ public class UHC extends TeamGame private boolean _mapLoaded = false; private double _mapLoadPercent = 0; - private int _chunksPerTick = 2; + private int _chunksPerTick = 1; private int _chunkTotal; private Chunk _chunk = null; private int _chunkX = 0; @@ -401,9 +401,10 @@ public class UHC extends TeamGame return; // Print Debug - if (event.getType() == UpdateType.SLOW) + if (event.getType() == UpdateType.SLOWER) { - System.out.println("Map Generation: " + _chunksLoaded + "/" + _chunkTotal); + Announce(C.cGreen + C.Bold + "Generating Map: " + C.cWhite + getMapLoadETA() + " Remaining...", false); + TimingManager.endTotal("UHC Generation", true); return; } @@ -1660,7 +1661,7 @@ public class UHC extends TeamGame { int chunksToGo = _chunkTotal - _chunksLoaded; - return UtilTime.MakeStr((long) ((double)chunksToGo / (double)(2 * 20) * 1000d), 1); + return UtilTime.MakeStr((long) ((double)chunksToGo / (double)(_chunksPerTick * 20) * 1000d), 1); } @EventHandler(priority = EventPriority.HIGH) @@ -1734,11 +1735,14 @@ public class UHC extends TeamGame //Get Team GameTeam team = getEmptyTeam(); - //team.SetName(player.getName() + " & " + ally.getName()); - + if (team == null) + return; + //Join Team SetPlayerTeam(player, team, true); SetPlayerTeam(ally, team, true); + + team.setDisplayName(player.getName() + " & " + ally.getName()); } //Send Invite else diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java index f9d578dc1..1f2a1c78c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java @@ -93,7 +93,8 @@ public class WorldData FileUtil.DeleteFolder(dir); dir = new File(GetFolder() + "/level.dat"); - dir.delete(); + if (dir.exists()) + dir.delete(); //Create Fresh World with Random Seed WorldCreator creator = new WorldCreator(GetFolder());