diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-28 04:23:38 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-28 04:23:38 +0100 |
commit | e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776 (patch) | |
tree | 83b569a981b7e0a13aa4703e26f22aadaf724804 | |
parent | 0ed7f87ee0f8c077f6bb66bee696352d371fe7a4 (diff) | |
parent | b637e494c28884b2620014dde4fbc16eb595bf5c (diff) | |
download | Essentials-e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776.tar Essentials-e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776.tar.gz Essentials-e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776.tar.lz Essentials-e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776.tar.xz Essentials-e1e7a1cfdb3fe6ceab20981db8edc7ee387cb776.zip |
Merge branch 'refs/heads/master' into release
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/InventoryWorkaround.java | 18 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Mob.java | 6 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java | 30 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtp.java | 1 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandweather.java | 1 | ||||
-rw-r--r-- | lib/bukkit-1.0.0-R1-SNAPSHOT.jar | bin | 4396376 -> 4396774 bytes | |||
-rw-r--r-- | lib/craftbukkit-1.0.0-SNAPSHOT.jar | bin | 9781560 -> 9782936 bytes |
8 files changed, 41 insertions, 17 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 62f7ad04e..ca4c6ad6a 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -57,7 +57,7 @@ import org.bukkit.scheduler.BukkitScheduler; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 1518; + public static final int BUKKIT_VERSION = 1522; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java b/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java index 4ce5cb52e..0b8121f89 100644 --- a/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java +++ b/Essentials/src/com/earth2me/essentials/InventoryWorkaround.java @@ -151,13 +151,27 @@ public final class InventoryWorkaround { ItemStack stack = item.clone(); stack.setAmount(dontBreakStacks ? ess.getSettings().getDefaultStackSize() : item.getType().getMaxStackSize()); - EnchantmentFix.setItem(cinventory, firstFree, stack); + if (cinventory instanceof FakeInventory) + { + cinventory.setItem(firstFree, stack); + } + else + { + EnchantmentFix.setItem(cinventory, firstFree, stack); + } item.setAmount(item.getAmount() - item.getType().getMaxStackSize()); } else { // Just store it - EnchantmentFix.setItem(cinventory, firstFree, item); + if (cinventory instanceof FakeInventory) + { + cinventory.setItem(firstFree, item); + } + else + { + EnchantmentFix.setItem(cinventory, firstFree, item); + } break; } } diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 394bbaf23..76e21630e 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -36,8 +36,10 @@ public enum Mob ENDERDRAGON("EnderDragon", Enemies.ENEMY, CreatureType.ENDER_DRAGON), VILLAGER("Villager", Enemies.FRIENDLY, CreatureType.VILLAGER), BLAZE("Blaze", Enemies.ENEMY, CreatureType.BLAZE), - MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW); - //TODO: Snowman + MUSHROOMCOW("MushroomCow", Enemies.FRIENDLY, CreatureType.MUSHROOM_COW), + MAGMACUBE("MagmaCube", Enemies.ENEMY, CreatureType.MAGMA_CUBE), + SNOWMAN("Snowman", Enemies.FRIENDLY, CreatureType.SNOWMAN); + public static final Logger logger = Logger.getLogger("Minecraft"); private Mob(String n, Enemies en, String s, CreatureType type) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java index 0e8918d9e..ce891985e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java @@ -17,28 +17,34 @@ public class Commanddelhome extends EssentialsCommand @Override public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - //Allowing both formats /delhome khobbits house | /delhome khobbits:house - final String[] expandedArgs = args[0].split(":"); + if (args.length < 1) + { + throw new NotEnoughArgumentsException(); + } User user = ess.getUser(sender); String name; - if (expandedArgs.length < 1) + final String[] expandedArg = args[0].split(":"); + + if (expandedArg.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others"))) { - throw new NotEnoughArgumentsException(); + user = getPlayer(server, expandedArg, 0, true); + name = expandedArg[1]; } - else if (expandedArgs.length > 1 && (user == null || user.isAuthorized("essentials.delhome.others"))) + else if (user == null) { - user = getPlayer(server, expandedArgs, 0, true); - name = expandedArgs[1]; + throw new NotEnoughArgumentsException(); } else { - if (user == null) - { - throw new NotEnoughArgumentsException(); - } - name = expandedArgs[0]; + name = expandedArg[0]; } + //TODO: Think up a nice error message + /* + * if (name.equalsIgnoreCase("bed")) { + * throw new Exception("You cannot remove the vanilla home point"); + * } + */ user.delHome(name.toLowerCase(Locale.ENGLISH)); sender.sendMessage(_("deleteHome", name)); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java index ac3991060..10c381b2e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtp.java @@ -38,6 +38,7 @@ public class Commandtp extends EssentialsCommand default: if (!user.isAuthorized("essentials.tpohere")) { + //TODO: Translate this throw new Exception("You need access to /tpohere to teleport other players."); } user.sendMessage(_("teleporting")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java index bb1fc0927..1229c9ee4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandweather.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandweather.java @@ -43,6 +43,7 @@ public class Commandweather extends EssentialsCommand } } + //TODO: Translate these @Override protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception { diff --git a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar Binary files differindex 60939e166..259ebadfd 100644 --- a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar +++ b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar diff --git a/lib/craftbukkit-1.0.0-SNAPSHOT.jar b/lib/craftbukkit-1.0.0-SNAPSHOT.jar Binary files differindex 9285ca484..0bd508b04 100644 --- a/lib/craftbukkit-1.0.0-SNAPSHOT.jar +++ b/lib/craftbukkit-1.0.0-SNAPSHOT.jar |