MobArena plugin for Minecraft
Go to file
Andreas Troelsen 02f75d0e7f Prevent infinite loops due to PlayerDropItemEvent from /give command.
Apparently, the /give command will drop an item "as" the target player, resulting in the player picking up the item if there is room in their inventory. This triggers a PlayerDropItemEvent, which MobArena catches and tries to cancel if the target player is in an arena. Furthermore, if the player is a spectator outside of the arena region, MobArena will force the player to leave the arena. This triggers the reward granting logic, so using the /give command as a reward has the potential of causing an infinite loop.

This commit introduces the idea of "leaving players", i.e. players in the process of leaving the arena. In the event of a dropped item from a player who is currently leaving an arena, the PlayerDropItemEvent is ignored, because it is assumed to be from the /give command. Note that this doesn't actually prevent normal PlayerDropItemEvents from causing a forced leave, since the player won't be in the process of leaving at that specific point.
2018-04-23 00:51:14 +02:00
.github Make issue template less text-heavy in comments, add documentation as option 2017-12-05 01:12:00 +01:00
docs Update "Item and reward syntax" documentation (see full commit) 2018-01-15 22:05:05 +01:00
lib Add MagicSpells to the lib/ folder. 2017-11-19 17:07:00 +01:00
src Prevent infinite loops due to PlayerDropItemEvent from /give command. 2018-04-23 00:51:14 +02:00
.gitignore Update .gitignore for Python virtualenvs (for docs) 2017-11-29 14:06:51 -05:00
.travis.yml Build against Java 8. 2018-04-17 18:18:05 +02:00
LICENSE.md Add license. 2014-06-03 14:45:23 +02:00
pom.xml Build against Java 8. 2018-04-17 18:18:05 +02:00
README.md Convert all GitHub wiki pages into ReStructuredText documents, set up ReadTheDocs 2017-12-02 19:16:17 -05:00

MobArena Build Status Documentation Status

MobArena is an arena-style minigame for Spigot-based Minecraft servers

Getting Started

If you don't want to compile the plugin yourself, grab a release artifact from one of these two sites:

The wiki here on Github should have all the information you need to get started using the plugin.

Getting Help

If you run into problems or need help with something, feel free to hop on IRC (#mobarena @ irc.esper.net) to have a chat. If you don't know what IRC is or don't have an IRC client, you can use a web-based one:

Remember, though, that IRC is idle chat, which means you likely won't get a response immediately. It could take anything from a couple of seconds to a day, but your message will be seen.

Bugs and Suggestions

Found a bug or have a great idea for the plugin? Use the issue tracker here on Github to submit a bug report or feature request. Please have a look through the existing issues before you post a new one to avoid duplicates.