Incomplete Push for Refactoring

This commit is contained in:
Kam committed 2025-02-20 21:39:02 -05:00
1 parent cd3514aa73
commit 7820e37180
14 files changed
+473 -261

No files matched your search

@@ -1,5 +1,6 @@
package noppes.npcs.client.gui.player.inventory;
import kamkeel.npcs.controllers.data.ISlot;
import kamkeel.npcs.controllers.data.InfoEntry;
import kamkeel.npcs.controllers.data.Profile;
import kamkeel.npcs.controllers.data.Slot;
@@ -321,9 +322,9 @@ public class GuiProfiles extends GuiCNPCInventory implements ISubGuiListener, IC
slot = null;
selected = scroll.getSelected();
if (profile != null && selected != null && !selected.isEmpty()){
for(Slot checkSlot : profile.slots.values()){
for(ISlot checkSlot : profile.getSlots().values()){
if(checkSlot.getId() == data.get(selected)){
slot = checkSlot;
slot = (Slot) checkSlot;
break;
}
}
@@ -342,9 +343,9 @@ public class GuiProfiles extends GuiCNPCInventory implements ISubGuiListener, IC
this.data = new HashMap<>();
String currentSlot = "\u00A7e";
String otherSlot = "\u00A7f";
for(Slot slot1 : profile.slots.values()){
for(ISlot slot1 : profile.getSlots().values()){
String name = slot1.getId() + " - " + slot1.getName();
if(profile.currentID == slot1.getId())
if(profile.currentSlotId == slot1.getId())
name = currentSlot + name;
else
name = otherSlot + name;
@@ -377,7 +377,7 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
public synchronized void save() {
// Don't Save this is a Modification of a Profile's PlayerData
Profile profile = ProfileController.getProfile(UUID.fromString(uuid));
if(profile != null && profile.currentID != this.profileSlot){
if(profile != null && profile.currentSlotId != this.profileSlot){
ProfileController.saveOffline(profile, UUID.fromString(uuid));
return;
}