Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. @EventHandler
  2. public void BedPlaced(BlockPlaceEvent event)
  3. {
  4. Player player = event.getPlayer();
  5. Block bed = event.getBlock();
  6.  
  7. if (bed.getType().equals(Material.BED_BLOCK))
  8. {
  9. player.setBedSpawnLocation(bed.getLocation());
  10. locations.add(bed.getLocation());
  11. getConfig().set(player.getUniqueId() + ".locations", locations);
  12. getConfig().getList(player.getUniqueId() + ".locations");
  13. this.saveConfig();
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement