O3Bubbles09

Untitled

Dec 19th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. package net.bubblecraft.rtp;
  2.  
  3. import java.util.HashMap;
  4.  
  5. import org.bukkit.Location;
  6. import org.bukkit.entity.Player;
  7.  
  8. public class Homes {
  9.    
  10.     public HashMap<String, HashMap<String, Location>> homes = new HashMap<String, HashMap<String, Location>>();
  11.    
  12.     public void addHome(Location loc, String str, Player player) {
  13.         String p = player.getName();
  14.         HashMap<String, Location> map = homes.get(p);
  15.         map.put(str, loc);
  16.        
  17.         homes.put(p, map);
  18.     }
  19.    
  20.     public void getHome(Player p, String str, Location loc) {
  21.         if(homes.containsKey(p)) {
  22.             p.teleport(homes.get(p).get(str));
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment