Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.xghostkillerx.unlimitedlava;
- import org.bukkit.Material;
- import org.bukkit.entity.Player;
- import org.bukkit.event.player.PlayerBucketFillEvent;
- import org.bukkit.event.player.PlayerListener;
- import org.bukkit.inventory.ItemStack;
- /**
- * UnlimitedLavaPlayerListener
- * Handles the players activities!
- *
- * Refer to:
- * http://bit.ly/n1Wex2
- *
- * @author xGhOsTkiLLeRx
- * @thanks to loganwm for the help!!
- * @thanks to Edward Hand for the idea and original InfiniteLava plugin!
- *
- */
- public class UnlimitedLavaPlayerListener extends PlayerListener {
- public static UnlimitedLava plugin;
- public UnlimitedLavaPlayerListener(UnlimitedLava instance) {
- plugin = instance;
- }
- public void onPlayerBucketFill(PlayerBucketFillEvent event, Player player, ItemStack itemInHand) {
- if (plugin.permissions = true) {
- event.getItemStack();
- if (event.getBlockClicked().getTypeId() == 9) {
- return;
- }
- if (!player.hasPermission("unlimitedlava.use")) {
- event.setItemStack(new ItemStack (Material.BOOK, 1));
- player.sendMessage("Debug, test message!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment