Compare commits

...
2 Commits
Author SHA1 Message Date
sk89q 0d2c2121bb 3.2.1 CHANGELOG.txt. 2011-01-31 14:36:33 -08:00
sk89q 21040b306a Updated for ItemStack change in Bukkit. 2011-01-31 14:35:46 -08:00
4 changed files with 6 additions and 3 deletions

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
3.2.1:
- Updated for recent Bukkit ItemStack change.
3.2:
- Added regions.default.pvp to control default PvP setting.
- Updated WorldGuard for the newer builds of Bukkit.
@@ -65,7 +65,7 @@ public class WorldGuardBlockListener extends BlockListener {
if (!plugin.itemDurability && event.getDamageLevel() == BlockDamageLevel.BROKEN) {
ItemStack held = player.getItemInHand();
if (held.getTypeId() > 0) {
held.setDamage((byte)-1);
held.setDurability((short) -1);
player.setItemInHand(held);
}
}
@@ -100,7 +100,7 @@ public class WorldGuardPlayerListener extends PlayerListener {
if (!plugin.itemDurability) {
// Hoes
if (item.getTypeId() >= 290 && item.getTypeId() <= 294) {
item.setDamage((byte)-1);
item.setDurability((byte)-1);
player.setItemInHand(item);
}
}
@@ -625,7 +625,7 @@ public class WorldGuardPlugin extends JavaPlugin {
// Blocks store their color in the damage value
if (item2.getTypeId() == item.getTypeId() &&
(!ItemType.usesDamageValue(item.getTypeId())
|| item.getDamage() == item2.getDamage())) {
|| item.getDurability() == item2.getDurability())) {
// This stack won't fit in the parent stack
if (item2.getAmount() > needed) {
item.setAmount(64);