forked from SteamWar/SteamWar
Implement rest of PlotRegionBackups
This commit is contained in:
+3
-3
@@ -50,7 +50,7 @@ public class DynamicRegionCommand extends SWCommand {
|
||||
|
||||
// Check location!
|
||||
|
||||
Class<? extends DynamicRegion> regionClass = DynamicRegionSystem.identifierDataMap.get(regionType);
|
||||
Class<? extends DynamicRegion> regionClass = DynamicRegionSystem.getRegionClassByIdentifier(regionType);
|
||||
DynamicRegion dynamicRegion = DynamicRegionRepository.constructRegion(regionClass, UUID.randomUUID(), tile.getMinX(), tile.getMinZ());
|
||||
if (dynamicRegion == null) {
|
||||
// TODO: Give error to user
|
||||
@@ -73,7 +73,7 @@ public class DynamicRegionCommand extends SWCommand {
|
||||
return new TypeMapper<>() {
|
||||
@Override
|
||||
public String map(CommandSender commandSender, String[] previousArguments, String s) {
|
||||
if (DynamicRegionSystem.identifierDataMap.containsKey(s)) {
|
||||
if (DynamicRegionSystem.hasRegionClassForIdentifier(s)) {
|
||||
return s;
|
||||
} else {
|
||||
return null;
|
||||
@@ -82,7 +82,7 @@ public class DynamicRegionCommand extends SWCommand {
|
||||
|
||||
@Override
|
||||
public Collection<String> tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) {
|
||||
return DynamicRegionSystem.identifierDataMap.keySet();
|
||||
return DynamicRegionSystem.allRegionIdentifiers();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user