add IslandManager
This commit is contained in:
parent
d8b9a96355
commit
5cddc98e83
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.alttd.cometskyblock.managers;
|
||||||
|
|
||||||
|
import com.alttd.cometskyblock.CometSkyBlockPlugin;
|
||||||
|
import com.alttd.cometskyblock.island.Island;
|
||||||
|
import org.bukkit.World;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class IslandManager {
|
||||||
|
|
||||||
|
private final CometSkyBlockPlugin plugin;
|
||||||
|
|
||||||
|
private HashMap<UUID, Island> islands;
|
||||||
|
|
||||||
|
public IslandManager(CometSkyBlockPlugin plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
|
||||||
|
loadIslands();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadIslands() {
|
||||||
|
this.islands = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Island getIsland(World world) {
|
||||||
|
return getIsland(world.getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Island getIsland(UUID uuid) {
|
||||||
|
return islands.get(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user