diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 948c099..8602d87 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index cd76b4b..2ae4b4e 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -381,6 +381,7 @@ public class PlayerStructure { workable.set("equipweapons", equipweapons); workable.set("equiparmor", equiparmor); workable.set("playermode_on_death", playermode_on_death.name()); + workable.set("rangermode", rangermode.name()); //ConfigurationSection deathlootlist = workable.createSection("deathloot"); if (DeathManager.deathStructureExists(Bukkit.getPlayer(name))) { DeathStructure ds = DeathManager.getDeathStructure(Bukkit.getPlayer(name)); @@ -515,6 +516,7 @@ public class PlayerStructure { workable.addDefault("COOLDOWN_lastusedwindslash", lastusedwindslash); workable.addDefault("COOLDOWN_lastusedbeastwithin", lastusedbeastwithin); workable.addDefault("BUFFCOUNT", 0); + workable.addDefault("rangermode", "CLOSE"); workable.options().copyDefaults(); @@ -575,6 +577,7 @@ public class PlayerStructure { this.vacuumsuckup = workable.getBoolean("vacuumsuckup"); this.equipweapons = workable.getBoolean("equipweapons"); this.equiparmor = workable.getBoolean("equiparmor"); + this.rangermode = BowMode.valueOf(workable.getString("rangermode")); String tempworld = workable.getString("restartloc_world"); if (tempworld!=null && !tempworld.equalsIgnoreCase("null")) { this.restartLoc = new Location(Bukkit.getWorld(tempworld),workable.getDouble("restartloc_x"),workable.getDouble("restartloc_y"),workable.getDouble("restartloc_z")); diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 5c3582e..3cff636 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -2992,10 +2992,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener { int dropAmt = amt; while (dropAmt>0) { if (dropAmt>shop.GetItem().getMaxStackSize()) { - shopItem.setAmount(shop.GetItem().getMaxStackSize()); - final ItemStack dropitem = shopItem.clone(); - Bukkit.getScheduler().scheduleSyncDelayedTask(this, new GivePlayerPurchasedItems(cc, ev, dropitem),1); - dropAmt-=shop.GetItem().getMaxStackSize(); + shopItem.setAmount(shop.GetItem().getMaxStackSize()); + final ItemStack dropitem = shopItem.clone(); + Bukkit.getScheduler().scheduleSyncDelayedTask(this, new GivePlayerPurchasedItems(cc, ev, dropitem),1); + dropAmt-=shop.GetItem().getMaxStackSize(); } else { shopItem.setAmount(dropAmt); final ItemStack dropitem = shopItem.clone(); diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java index b8c70e3..0875418 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java @@ -663,8 +663,10 @@ public final class TwosideKeeperAPI { return b.getExpireTime(); } /** - * Adds a buff to the player's buff data structure, overwriting the buff if it contains - * the same name. A new Buff data structure has to be created and filled in. + * Attempts to add a buff to the player's buff data structure, overwriting the buff if it contains + * the same name. Note that the buff will not be added if the amplifier of the buff is less than what + * is currently applied, or the amplifier is equal but the duration is less. A new Buff data structure + * has to be created and filled in when calling this (use new Buff()) */ public static void addBuff(LivingEntity l, String name, Buff buff, boolean stacking) { Buff.addBuff(l, name, buff, stacking);