EnderHoppers For GriefPrevention

Version 1.3

Updated for Spigot 1.8.1 API and GriefPrevention 10.7.1. I'm as surprised as anybody, given my long hiatus.

This Plugin works with GriefPrevention and allows Hopper functionality to work with EnderChests by dealing with the EnderChest inventory of the claim owner.

Configuration can be done by editing the file /EnderHoppers/config.yml in your plugin directory, and currently allows for the adjustment of how often items are taken from or given to appropriate EnderChest Inventories. The default is currently once every three seconds (60, as the configuration is in game ticks) which makes them slower than when Hoppers are used with a chest as well as reducing performance implications. Configuration also presents the ability to define a whitelist through an EnderHoppers.WhiteList configuration option within the aforementioned configuration. If this whitelist has entries, this Plugin will only transfer items to and from EnderChests for Players who's name are in the whitelist.

Better Ender Chest
Version 1.2 has added support for the Inventories managed by Better Ender Chest. Since I don't know a lot about Better Ender Chest's various expanded capabilities, I may have missed some functional requirements. It has however worked in my testing. This should not affect the functionality of GP Ender Hoppers without Better Ender Chest installed, in which case it will of course default to the standard Player Ender Chest.

Usage

When installed, this will allow Hoppers to Work With EnderChests within a Claim. That is:

  • When a Hopper is underneath an Ender Chest, it will extract contents from the EnderChest Inventory of the Claim owner, as long as they are Online.
  • When a Hopper is attached to an Ender Chest, it will pipe it's contents into the EnderChest Inventory of the Claim owner, as long as they are Online.

Items are removed and added at the Interval specified in the configuration file, which defaults to 60 (or three seconds). Each time One item is taken from the Hopper and placed into the Ender Chest or vice versa. Nothing happens if the Destination is already full, the source is empty, or if the Player that owns the Claim is not online. thus making this function almost identically to the Vanilla Hoppers and Chests, aside from the Online requirement for the Claim owner.

Another side effect is that if you create very complex structures, sometimes items can end up in unexpected locations. This is particularly the case if you have more than one Ender Chest Inventory being "sucked" from. In this case the actual order is more or less undefined. However, what this will usually mean is that the first Hopper that was loaded will take precedence. Since you cannot predict the order they will be loaded, however, it is best not to try to rely on this behaviour.

Another caveat to consider is that this means that anybody with build permissions in a claim can essentially take or put items into the claim owners EnderChest Inventory. There isn't much of a way around this, since the functionality is essentially just added to Hoppers themselves and associates with the EnderChest inventory of whoever owns the Claim.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members