mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 02:57:42 +01:00
renamed new map to not confuse gson
This commit is contained in:
parent
03d0f962e5
commit
19cfd9edc6
@ -27,13 +27,13 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the flags for a region.
|
* Holds the sFlags for a region.
|
||||||
*
|
*
|
||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public class RegionFlagContainer {
|
public class RegionFlagContainer {
|
||||||
|
|
||||||
private Map<String, String> flags = new HashMap<String, String>();
|
private Map<String, String> sFlags = new HashMap<String, String>();
|
||||||
private transient Map<FlagType, RegionFlag> flagData = new EnumMap<FlagType, RegionFlag>(FlagType.class);
|
private transient Map<FlagType, RegionFlag> flagData = new EnumMap<FlagType, RegionFlag>(FlagType.class);
|
||||||
private transient boolean hasInit = false;
|
private transient boolean hasInit = false;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public RegionFlag getFlag(FlagType type) {
|
|||||||
|
|
||||||
private void initFlagData() {
|
private void initFlagData() {
|
||||||
|
|
||||||
Iterator<Entry<String, String>> iter = this.flags.entrySet().iterator();
|
Iterator<Entry<String, String>> iter = this.sFlags.entrySet().iterator();
|
||||||
|
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Entry<String, String> entry = iter.next();
|
Entry<String, String> entry = iter.next();
|
||||||
@ -79,9 +79,9 @@ protected void internalSetValue(String name, String value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
this.flags.remove(name);
|
this.sFlags.remove(name);
|
||||||
} else {
|
} else {
|
||||||
this.flags.put(name, value);
|
this.sFlags.put(name, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,13 +92,13 @@ public boolean equals(Object obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RegionFlagContainer other = (RegionFlagContainer) obj;
|
RegionFlagContainer other = (RegionFlagContainer) obj;
|
||||||
return other.flags.equals(this.flags);
|
return other.sFlags.equals(this.sFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 3;
|
int hash = 3;
|
||||||
hash = 97 * hash + (this.flags != null ? this.flags.hashCode() : 0);
|
hash = 97 * hash + (this.sFlags != null ? this.sFlags.hashCode() : 0);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ public final class StateRegionFlag extends RegionFlag {
|
|||||||
|
|
||||||
public StateRegionFlag(RegionFlagContainer container, RegionFlagInfo info, String value) {
|
public StateRegionFlag(RegionFlagContainer container, RegionFlagInfo info, String value) {
|
||||||
super(container, info);
|
super(container, info);
|
||||||
System.out.println("new state value : " + value);
|
|
||||||
this.setValue(value);
|
this.setValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user