Merge remote-tracking branch 'origin/clans-beta' into clans-beta

This commit is contained in:
Shaun Bennett 2015-11-07 19:58:12 -05:00
commit ffc389f9c7
5 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,6 @@
package mineplex.game.clans.clans;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
import java.util.TimeZone;
@ -170,7 +171,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
private NautHashMap<String, ClanTerritory> _claimMap = new NautHashMap<String, ClanTerritory>();
private NautHashMap<String, Long> _unclaimMap = new NautHashMap<String, Long>();
public String UserDataPath = UtilServer.getServer().getWorlds().get(0).getWorldFolder().getPath() + "\\..\\CLANS_USER_DATA\\";
public String UserDataDir = UtilServer.getServer().getWorlds().get(0).getWorldFolder().getPath() + File.separator + ".." + File.separator + "CLANS_USER_DATA" + File.separator;
// Spawn area

View File

@ -58,7 +58,7 @@ public class SafeLog extends MiniPlugin
_hint = new HashMap<>();
_clansManager = clansManager;
new File(plugin.getServer().getWorlds().get(0).getWorldFolder().getPath() + "\\..\\CLANS_USER_DATA\\").mkdir();
new File(clansManager.UserDataDir).mkdir();
}
public void onPlayerQuit(Player player)
@ -84,13 +84,13 @@ public class SafeLog extends MiniPlugin
NPCManager.getInstance().despawnLogoutNpc(player);
}
File deathFile = new File(_clansManager.UserDataPath + String.format("DEATH_%s.dat", player.getUniqueId().toString()));
File deathFile = new File(_clansManager.UserDataDir + String.format("DEATH_%s.dat", player.getUniqueId().toString()));
if (deathFile.exists())
{
try
{
DataFileReader reader = UtilFile.beginReading(_clansManager.UserDataPath + String.format("DEATH_%s.dat", player.getUniqueId().toString()));
DataFileReader reader = UtilFile.beginReading(_clansManager.UserDataDir + String.format("DEATH_%s.dat", player.getUniqueId().toString()));
final long time = (long) reader.readChunk(ChunkType.LONG);
final String killerName = (String) reader.readChunk(ChunkType.STRING);

View File

@ -73,7 +73,7 @@ public class NPCManager extends MiniPlugin
{
if (!hasLogoutNpc(player))
{
CombatLogNPC npc = new CombatLogNPC(player, _clansManager.getDisguiseManager(), _hologramManager, player.getGameMode().equals(GameMode.CREATIVE), _clansManager.UserDataPath);
CombatLogNPC npc = new CombatLogNPC(player, _clansManager.getDisguiseManager(), _hologramManager, player.getGameMode().equals(GameMode.CREATIVE), _clansManager.UserDataDir);
npc.spawn();
_logoutNpcs.add(npc);
log(String.format("Spawned combat log NPC for %s!", player.getName()));

View File

@ -12,7 +12,7 @@ public class GearCommand extends CommandBase<GearManager>
public GearCommand(GearManager plugin)
{
super(plugin, Rank.ALL, "gear", "custom-gear");
super(plugin, Rank.ADMIN, "gear", "custom-gear");
_gearManager = plugin;
}

View File

@ -111,7 +111,7 @@ public class GearPage extends ShopPageBase<GearManager, GearShop>
_bowPrefixes = Arrays.<Class<? extends ItemAttribute>> asList(HeavyArrowsAttribute.class, HuntingAttribute.class, InverseAttribute.class, RecursiveAttribute.class);
_bowSuffixes = Arrays.<Class<? extends ItemAttribute>> asList(SlayingAttribute.class);
_armorTypes = Arrays.asList(Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS, Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS, Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS);
_armorTypes = Arrays.asList(Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS, Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS, Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS, Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS);
_weaponTypes = Arrays.asList(Material.DIAMOND_SWORD, Material.DIAMOND_AXE, Material.IRON_SWORD, Material.IRON_AXE, Material.GOLD_SWORD, Material.GOLD_AXE, Material.STONE_SWORD, Material.STONE_AXE);
buildPage();