Advertisement
Guest User

newpvpenable

a guest
Apr 9th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. package me.bennett.TheSearch;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.ChatColor;
  5. import org.bukkit.Material;
  6. import org.bukkit.block.Block;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.event.EventHandler;
  9. import org.bukkit.event.Listener;
  10. import org.bukkit.event.block.BlockPlaceEvent;
  11. import org.bukkit.plugin.PluginManager;
  12. import org.bukkit.plugin.java.JavaPlugin;
  13.  
  14. public class Main extends JavaPlugin implements Listener {
  15.  
  16. public void onEnable(){
  17. PluginManager pm = Bukkit.getPluginManager();
  18. pm.registerEvents(this, this);
  19. }
  20.  
  21. @EventHandler
  22.  
  23. public void onBlockPlace(BlockPlaceEvent event) {
  24. Block block = event.getBlockPlaced();
  25. Player player = event.getPlayer();
  26.  
  27. if (block.getType() == Material.DIAMOND_BLOCK
  28. player.sendMessage(ChatColor.AQUA + "YOU HAVE COMPLETED THE SEARCH! PVP MODE WILL NOW ENABLE! FIGHT TO THE DEATH! LAST STANDING WINS!")
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement