mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-02-27 09:42:26 +01:00
Changed selections to not use enum
This commit is contained in:
parent
430b278e4c
commit
32524e6ce9
@ -1,6 +0,0 @@
|
||||
package com.sekwah.advancedportals.core.enums;
|
||||
|
||||
public enum EnumHandSelection {
|
||||
LEFTHAND,
|
||||
RIGHTHAND
|
||||
}
|
@ -12,9 +12,9 @@ public interface PortalTempDataRepository {
|
||||
|
||||
void removeSelectedPortal(UUID uuid);
|
||||
|
||||
void addSelectedHand(UUID uuid, EnumHandSelection enumHandSelection, PortalLocation portalLocation);
|
||||
void addSelectedPosition(UUID uuid, boolean isPos1, PortalLocation portalLocation);
|
||||
|
||||
void removeSelectedHand(UUID uuid, EnumHandSelection enumHandSelection);
|
||||
void removeSelectedPosition(UUID uuid, boolean isPos1);
|
||||
|
||||
void removeAllSelectedHand(UUID uuid);
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class PortalTempDataRepositoryImpl implements PortalTempDataRepository {
|
||||
.expireAfterAccess(30, TimeUnit.DAYS)
|
||||
.build();
|
||||
|
||||
Table<UUID, EnumHandSelection, PortalLocation> selectedHand = HashBasedTable.create();
|
||||
Table<UUID, Boolean, PortalLocation> selectedPositions = HashBasedTable.create();
|
||||
|
||||
@Override
|
||||
public void addSelectedPortal(UUID selectedPlayer, String portal) {
|
||||
@ -33,19 +33,19 @@ public class PortalTempDataRepositoryImpl implements PortalTempDataRepository {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSelectedHand(UUID uuid, EnumHandSelection enumHandSelection, PortalLocation portalLocation) {
|
||||
selectedHand.put(uuid, enumHandSelection, portalLocation);
|
||||
public void addSelectedPosition(UUID uuid, boolean isPos1, PortalLocation portalLocation) {
|
||||
selectedPositions.put(uuid, isPos1, portalLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSelectedHand(UUID uuid, EnumHandSelection enumHandSelection) {
|
||||
selectedHand.remove(uuid, enumHandSelection);
|
||||
public void removeSelectedPosition(UUID uuid, boolean isPos1) {
|
||||
selectedPositions.remove(uuid, isPos1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllSelectedHand(UUID uuid) {
|
||||
selectedHand.remove(uuid, EnumHandSelection.LEFTHAND);
|
||||
selectedHand.remove(uuid, EnumHandSelection.RIGHTHAND);
|
||||
selectedPositions.remove(uuid, EnumHandSelection.LEFTHAND);
|
||||
selectedPositions.remove(uuid, EnumHandSelection.RIGHTHAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user