Updates to API, ranger mode is now remembered upon logging back in.
This commit is contained in:
parent
826467da8e
commit
c75d629eb3
Binary file not shown.
@ -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"));
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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 <b>new Buff()</b>)
|
||||
*/
|
||||
public static void addBuff(LivingEntity l, String name, Buff buff, boolean stacking) {
|
||||
Buff.addBuff(l, name, buff, stacking);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user