Commit Graph

484 Commits

Author SHA1 Message Date
Andreas Troelsen
da094e0f57 Optimize imports on all project files.
Big commit, no functional changes ¯\_(ツ)_/¯
2017-03-13 20:47:48 +01:00
Andreas Troelsen
a8b62623e8 Don't give pets and mounts to players who bring their own items.
Bringing a full stack of bones will no longer result in a full pack of wolves.
2017-03-12 21:42:57 +01:00
Andreas Troelsen
ac806f967f Remove Metrics.
Turns out this thing isn't even online anymore. Let's get rid of it.
2017-03-11 15:42:11 +01:00
Andreas Troelsen
2fdfd64ddf Use == operator for comparing EquipmentSlot values. Fixes #361
Because the == operator is null safe, we don't need to worry about null checking.
2017-03-11 13:59:37 +01:00
Andreas Troelsen
f212c657b0 Move Messenger announce() methods into Arena.
Since the announce() methods always required an Arena argument, and since the Messenger instance used was always acquired from an Arena instance, there really was no reason for the methods to exist on Messenger.
2017-03-10 23:40:56 +01:00
Andreas Troelsen
56dc504bec Refactor Messenger to allow for custom prefixes.
- Messenger no longer has a static nature and must be instantiated to be used. The prefix is provided in the constructor.
- MobArena instantiates a global Messenger in onEnable() with a prefix string from global-settings. This instance is used by anything that isn't arena-specific, as well as for arenas with no prefix.
- ArenaImpl instantiates a local Messenger in its constructor if, and only if, its arena-specific prefix setting is non-empty. Otherwise it uses the plugin's global instance.
2017-03-10 23:32:52 +01:00
Andreas Troelsen
5d6a7768e8 Refactor logging out of Messenger.
This removes the logging capabilities from Messenger and replaces all references to them with proper logging via Bukkit's PluginLogger that all plugins have.
2017-03-10 21:48:00 +01:00
Andreas Troelsen
9b1866e6cc Replace spaces in class names when toLowerCase'ing them. 2017-02-18 03:36:35 +01:00
Andreas Troelsen
fbe80d7ee6 Use config-file names for classes in messages. 2017-02-18 03:34:28 +01:00
Andreas Troelsen
692d7f52dc Add support for a per-arena default class. 2017-02-18 03:27:50 +01:00
Andreas Troelsen
d2fd8b4fc2 Add support for bringing your own items into the arena.
This implementation uses a sublcass of ArenaClass to make an implicit My Items class, which restores the player's inventory when granting items.
2017-02-18 03:27:10 +01:00
Andreas Troelsen
51f907218e Use a hardcoded potion map to deal with potion metas. Fixes #312 #343
Thanks slipcor!
2017-02-18 02:43:12 +01:00
Andreas Troelsen
48a85a7e85 Use a copy of the block list in BlockExplodeEvent for the fake EntityExplodeEvent. Fixes #356
The blockList() call returns the actual List<Block> object in the explode event, which means it'll be shared between the the fake event and the original event. As a result, the call to blockList().clear() will clear the shared list, and the following call to blockList().addAll(fake.blockList()) results in trying to add the empty list to itself.

This commit makes sure to copy the original event's block list before sending it to the fake event.
2017-02-14 17:26:20 +01:00
Andreas Troelsen
c66321ec78 Remove over-dramatic warning about harmless state inconsistency in start timers. Fixes #317
Okay, "Fixes" would be lying, and that's terrible, but here's something to help you shrug it off: The timer module is a bit of a mess, and since there isn't actually anything "dangerous" about this, let's just calm our tits and focus on other stuff.
2017-02-10 21:47:41 +01:00
Andreas Troelsen
f40e54f8bb Minor refactoring of class chests handling. Fixes #318 2017-02-10 21:40:02 +01:00
Andreas Troelsen
acbeb3d77f Guard against null scores for players who manage to die in the lobby. Fixes #319 2017-02-10 21:32:56 +01:00
Andreas Troelsen
7e049cdae6 Ignore off-hand interactions for class signs and ready blocks. Fixes #340 2017-02-10 15:52:44 +01:00
Andreas Troelsen
b7472dbc94 Prevent mobs from picking up dropped items and blocks. Fixes #344 2017-02-10 15:45:12 +01:00
Andreas Troelsen
788cfefa00 Give all mounts saddles - not just the normal horses. 2016-12-30 01:32:16 +01:00
Andreas Troelsen
fb1a87f71b Make sure all mounts are invincible, not just normal horses. 2016-12-30 01:11:56 +01:00
Andreas Troelsen
b40b73ea25 Remove support for llamas as mounts (they can't be controlled so no point yet). 2016-12-30 00:34:56 +01:00
Andreas Troelsen
41f0a892c4 Refactor mount spawning due to API changes; fixes an exception thrown when trying to use barding on non-normal horses.
This commit adds support for llamas and removes barding and saddles from non-horse mounts.
2016-12-29 21:56:29 +01:00
garbagemule
df43712964 Remove Shulker bullets on session cleanup. 2016-12-29 17:56:43 +01:00
garbagemule
8705b5c9f7 Add support for off-hand items. 2016-12-29 17:56:32 +01:00
garbagemule
558681a2f2 Remove redundant setContents() calls from class chest handlers.
Before, these redundant calls didn't really do anything. Now they mess everything up, because setContents() doesn't set inventory contents only, but the entire inventory instead, because that's so super useful. Well done, boys!

#notsalty
2016-12-29 17:55:46 +01:00
garbagemule
93ce8b9667 Fix Spigot's semi-breaking inventory change.
Because it is clearly impossible to change JavaDocs to correctly describe what a method does, the method setContents() has now been changed to a useless, over-aggressive, inventory-wiping piece of junk that must be invoked before anything else. This commit ensures that armor contents are set after the setContents() method is called, overwriting the nulls that the setContents() method creates.
2016-12-29 17:55:30 +01:00
Andreas Troelsen
11fb0ed573 Give strays a bow just like their normal skeleton friends. 2016-12-17 01:58:46 +01:00
garbagemule
60a173d447 Merge pull request #327 from slipcor/offhand-2
Ignore off-hand interact events in Setup Mode (since Minecraft/Spigot 1.9). Fixes #299
2016-12-17 01:44:43 +01:00
garbagemule
65f33ae1a4 Merge pull request #328 from slipcor/empty-inventory
Always check for both null stacks and "air stacks" (ItemStack ID 0) when checking for empty inventories. Fixes #302
2016-12-17 01:43:46 +01:00
garbagemule
bc7c321d28 Merge pull request #329 from slipcor/pets-2
Make pets (ocelots included) sit before teleporting players to the lobby. Fixes #247
2016-12-17 01:41:55 +01:00
slipcor
333a23ecdd fix skeletons only punching with the bow they already have by giving them a new one 2016-12-16 20:36:57 +01:00
slipcor
f81921efcd address github issue #247 (sit pets before teleporting) and include cats/ocelots as pets 2016-12-15 22:32:55 +01:00
slipcor
cbac56e199 address github issue #302 (joining with empty inventory) 2016-12-15 20:08:00 +01:00
slipcor
e6e4782de8 address github issue #299 (ignore offhand interact events thrown since Spigot 1.9) 2016-12-15 18:49:30 +01:00
slipcor
3b88b889d6 update to Spigot 1.11, fix entity spawning errors, remove redundant definitions 2016-12-15 13:13:21 +01:00
garbagemule
dbff678660 Add support for killer bunnies. 2015-09-16 18:51:43 +02:00
garbagemule
4d2b6927d4 Add support for elder guardians. 2015-08-23 15:34:22 +02:00
garbagemule
3a20be3db9 Make root-target find the nearest ground block to root to. 2015-07-28 20:25:08 +02:00
garbagemule
39196c7b61 Unwrap potential Player proxies in commands. 2015-07-17 17:50:51 +02:00
garbagemule
79ca18aa41 Fix default boss health value. 2015-07-17 16:41:58 +02:00
garbagemule
d32cd22a98 Make monster types case-insensitive. 2015-07-17 16:12:23 +02:00
garbagemule
a9eab13842 Fix Spigot block explosion issue. 2015-07-17 16:11:00 +02:00
garbagemule
95aebcf333 Merge branch 'ma-creature' 2015-07-17 04:45:57 +02:00
garbagemule
d3c5535f61 Cast null instead of creating a new set. 2015-07-17 04:45:48 +02:00
garbagemule
eda6e6e1f3 Static map initializer before constants. 2015-07-17 04:44:59 +02:00
garbagemule
0e814b9c0f Convert MACreature to class. 2015-07-17 04:25:24 +02:00
garbagemule
aafeb93d38 Update for Spigot and mavenize. 2015-07-17 03:38:41 +02:00
garbagemule
e663a10a2a Fix Spigot issue with skeleton/wolf targetting. 2014-12-13 20:29:02 +01:00
garbagemule
2e397fd123 Really fix the Spigot health issue (with a twist). 2014-12-13 20:28:14 +01:00
garbagemule
a8755ea496 Add a guard for ridiculous Spigot health issue. 2014-12-08 19:37:11 +01:00