>Modified Vendetta stacks to persist on relogs as well.
>Fixed a bug causing the off-hand weapon of a Barbarian to never disappear when broken. >Fixed an exploit allowing Barbarians to relog and reset their buffs to 0 stacks. >Fixed a bug causing players with newer profiles to bug out when leaving and relogging after death. >Fixed a bug causing Filter Cube filter inventories to close occasionally at random when a player still had the Filter inventory open.
This commit is contained in:
parent
640ea50149
commit
bdd45d404c
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
name: TwosideKeeper
|
name: TwosideKeeper
|
||||||
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
||||||
version: 3.10.0
|
version: 3.10.0a
|
||||||
commands:
|
commands:
|
||||||
money:
|
money:
|
||||||
description: Tells the player the amount of money they are holding.
|
description: Tells the player the amount of money they are holding.
|
||||||
|
@ -10,6 +10,8 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Hopper;
|
import org.bukkit.block.Hopper;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@ -70,4 +72,13 @@ public class ItemCubeUtils {
|
|||||||
}
|
}
|
||||||
return reject_items;
|
return reject_items;
|
||||||
}
|
}
|
||||||
|
public static boolean SomeoneHasAFilterCubeOpen() {
|
||||||
|
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||||
|
if (p.getOpenInventory()!=null && p.getOpenInventory().getTopInventory()!=null && p.getOpenInventory().getTopInventory().getType()==InventoryType.HOPPER) {
|
||||||
|
TwosideKeeper.log("Keep this open! "+p.getName()+" is using it!", 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,10 @@ public class PlayerStructure {
|
|||||||
workable.set("spleef_wins", spleef_wins);
|
workable.set("spleef_wins", spleef_wins);
|
||||||
workable.set("sounds_enabled", sounds_enabled);
|
workable.set("sounds_enabled", sounds_enabled);
|
||||||
workable.set("hasDied", hasDied);
|
workable.set("hasDied", hasDied);
|
||||||
|
workable.set("lifestealstacks", lifestealstacks);
|
||||||
|
workable.set("weaponcharges", weaponcharges);
|
||||||
|
workable.set("damagepool", damagepool);
|
||||||
|
workable.set("vendetta_amt", vendetta_amt);
|
||||||
//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));
|
||||||
@ -331,6 +335,10 @@ public class PlayerStructure {
|
|||||||
workable.addDefault("spleef_pts", spleef_pts);
|
workable.addDefault("spleef_pts", spleef_pts);
|
||||||
workable.addDefault("spleef_wins", spleef_wins);
|
workable.addDefault("spleef_wins", spleef_wins);
|
||||||
workable.addDefault("hasDied", hasDied);
|
workable.addDefault("hasDied", hasDied);
|
||||||
|
workable.addDefault("damagepool", damagepool);
|
||||||
|
workable.addDefault("weaponcharges", weaponcharges);
|
||||||
|
workable.addDefault("lifestealstacks", lifestealstacks);
|
||||||
|
workable.addDefault("vendetta_amt", vendetta_amt);
|
||||||
|
|
||||||
workable.options().copyDefaults();
|
workable.options().copyDefaults();
|
||||||
|
|
||||||
@ -353,8 +361,13 @@ public class PlayerStructure {
|
|||||||
this.deathloc_y = workable.getDouble("deathloc_y");
|
this.deathloc_y = workable.getDouble("deathloc_y");
|
||||||
this.deathloc_z = workable.getDouble("deathloc_z");
|
this.deathloc_z = workable.getDouble("deathloc_z");
|
||||||
this.deathloc_world = workable.getString("deathloc_world");
|
this.deathloc_world = workable.getString("deathloc_world");
|
||||||
|
this.damagepool = workable.getDouble("damagepool");
|
||||||
|
this.lifestealstacks = workable.getInt("lifestealstacks");
|
||||||
|
this.weaponcharges = workable.getInt("weaponcharges");
|
||||||
|
this.lastattacked = TwosideKeeper.getServerTickTime();
|
||||||
|
this.lastcombat = TwosideKeeper.getServerTickTime();
|
||||||
|
|
||||||
if (this.hasDied) {
|
/*if (this.hasDied) {
|
||||||
List<ItemStack> deathlootlist = new ArrayList<ItemStack>();
|
List<ItemStack> deathlootlist = new ArrayList<ItemStack>();
|
||||||
ConfigurationSection deathlootsection = workable.getConfigurationSection("deathloot");
|
ConfigurationSection deathlootsection = workable.getConfigurationSection("deathloot");
|
||||||
for (int i=0;i<deathlootsection.getKeys(false).size();i++) {
|
for (int i=0;i<deathlootsection.getKeys(false).size();i++) {
|
||||||
@ -362,7 +375,7 @@ public class PlayerStructure {
|
|||||||
deathlootlist.add(item);
|
deathlootlist.add(item);
|
||||||
}
|
}
|
||||||
DeathManager.addNewDeathStructure(deathlootlist, new Location(Bukkit.getWorld(this.deathloc_world),this.deathloc_x,this.deathloc_y,this.deathloc_z), Bukkit.getPlayer(name));
|
DeathManager.addNewDeathStructure(deathlootlist, new Location(Bukkit.getWorld(this.deathloc_world),this.deathloc_x,this.deathloc_y,this.deathloc_z), Bukkit.getPlayer(name));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
workable.save(config);
|
workable.save(config);
|
||||||
|
@ -2075,7 +2075,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
GenericFunctions.DealDamageToNearbyMobs(p.getLocation(), 0, 4, true, 0.9, p, p.getInventory().getExtraContents()[0], false, "Sweep Up");
|
GenericFunctions.DealDamageToNearbyMobs(p.getLocation(), 0, 4, true, 0.9, p, p.getInventory().getExtraContents()[0], false, "Sweep Up");
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
CustomDamage.ApplyDamage(0, p, (LivingEntity)ev.getRightClicked(), p.getInventory().getExtraContents()[0], null);
|
CustomDamage.ApplyDamage(0, p, (LivingEntity)ev.getRightClicked(), p.getInventory().getItem(40), null);
|
||||||
|
if (p.getInventory().getItem(40).getDurability()>p.getInventory().getItem(40).getType().getMaxDurability()) {
|
||||||
|
p.getInventory().setItem(40, new ItemStack(Material.AIR));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if (ev.getRightClicked() instanceof Monster) {
|
/*if (ev.getRightClicked() instanceof Monster) {
|
||||||
@ -4319,6 +4322,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (c.getWorld().getName().equalsIgnoreCase("FilterCube") &&
|
||||||
|
ItemCubeUtils.SomeoneHasAFilterCubeOpen()) {
|
||||||
|
ev.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateMonsterFlags(LivingEntity m) {
|
public void updateMonsterFlags(LivingEntity m) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user