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("equipweapons", equipweapons);
|
||||||
workable.set("equiparmor", equiparmor);
|
workable.set("equiparmor", equiparmor);
|
||||||
workable.set("playermode_on_death", playermode_on_death.name());
|
workable.set("playermode_on_death", playermode_on_death.name());
|
||||||
|
workable.set("rangermode", rangermode.name());
|
||||||
//ConfigurationSection deathlootlist = workable.createSection("deathloot");
|
//ConfigurationSection deathlootlist = workable.createSection("deathloot");
|
||||||
if (DeathManager.deathStructureExists(Bukkit.getPlayer(name))) {
|
if (DeathManager.deathStructureExists(Bukkit.getPlayer(name))) {
|
||||||
DeathStructure ds = DeathManager.getDeathStructure(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_lastusedwindslash", lastusedwindslash);
|
||||||
workable.addDefault("COOLDOWN_lastusedbeastwithin", lastusedbeastwithin);
|
workable.addDefault("COOLDOWN_lastusedbeastwithin", lastusedbeastwithin);
|
||||||
workable.addDefault("BUFFCOUNT", 0);
|
workable.addDefault("BUFFCOUNT", 0);
|
||||||
|
workable.addDefault("rangermode", "CLOSE");
|
||||||
|
|
||||||
workable.options().copyDefaults();
|
workable.options().copyDefaults();
|
||||||
|
|
||||||
@ -575,6 +577,7 @@ public class PlayerStructure {
|
|||||||
this.vacuumsuckup = workable.getBoolean("vacuumsuckup");
|
this.vacuumsuckup = workable.getBoolean("vacuumsuckup");
|
||||||
this.equipweapons = workable.getBoolean("equipweapons");
|
this.equipweapons = workable.getBoolean("equipweapons");
|
||||||
this.equiparmor = workable.getBoolean("equiparmor");
|
this.equiparmor = workable.getBoolean("equiparmor");
|
||||||
|
this.rangermode = BowMode.valueOf(workable.getString("rangermode"));
|
||||||
String tempworld = workable.getString("restartloc_world");
|
String tempworld = workable.getString("restartloc_world");
|
||||||
if (tempworld!=null && !tempworld.equalsIgnoreCase("null")) {
|
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"));
|
this.restartLoc = new Location(Bukkit.getWorld(tempworld),workable.getDouble("restartloc_x"),workable.getDouble("restartloc_y"),workable.getDouble("restartloc_z"));
|
||||||
|
@ -663,8 +663,10 @@ public final class TwosideKeeperAPI {
|
|||||||
return b.getExpireTime();
|
return b.getExpireTime();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Adds a buff to the player's buff data structure, overwriting the buff if it contains
|
* Attempts to add 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.
|
* 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) {
|
public static void addBuff(LivingEntity l, String name, Buff buff, boolean stacking) {
|
||||||
Buff.addBuff(l, name, buff, stacking);
|
Buff.addBuff(l, name, buff, stacking);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user