mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 04:05:12 +00:00
More work on the party GUI, which can now properly start a party. Created a party controller.
This commit is contained in:
1 parent
0ecc94bdb0
commit
2ef38dfdf4
6 files changed
+263
-23
No files matched your search
@@ -0,0 +1,36 @@
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import noppes.npcs.controllers.data.Party;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PartyController {
|
||||
private static PartyController Instance;
|
||||
|
||||
private HashMap<UUID, Party> parties = new HashMap<>();
|
||||
|
||||
private PartyController() {
|
||||
}
|
||||
|
||||
public static PartyController Instance() {
|
||||
if (Instance == null) {
|
||||
Instance = new PartyController();
|
||||
}
|
||||
return Instance;
|
||||
}
|
||||
|
||||
public Party createParty() {
|
||||
Party party = new Party();
|
||||
this.parties.put(party.getPartyUUID(), party);
|
||||
return party;
|
||||
}
|
||||
|
||||
public Party getParty(UUID partyUUID) {
|
||||
return this.parties.get(partyUUID);
|
||||
}
|
||||
|
||||
public void deleteParty(UUID partyUUID) {
|
||||
this.parties.remove(partyUUID);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user