Method made static and moved to manager.
This commit is contained in:
@@ -57,7 +57,7 @@ public class SetRankCmd extends AbstractDevCmd {
|
||||
Blueprint blueprint = targetBuilding.getBlueprint();
|
||||
|
||||
if (blueprint == null) {
|
||||
targetBuilding.setRank(targetRank);
|
||||
BuildingManager.setRank(targetBuilding, targetRank);
|
||||
ChatManager.chatSayInfo(player, "Building ranked without blueprint" + targetBuilding.getObjectUUID());
|
||||
return;
|
||||
}
|
||||
@@ -68,9 +68,8 @@ public class SetRankCmd extends AbstractDevCmd {
|
||||
}
|
||||
|
||||
// Set the current targetRank
|
||||
int lastMeshID = targetBuilding.getMeshUUID();
|
||||
targetBuilding.setRank(targetRank);
|
||||
|
||||
BuildingManager.setRank(targetBuilding, targetRank);
|
||||
ChatManager.chatSayInfo(player, "Rank set for building with ID " + targetBuilding.getObjectUUID() + " to rank " + targetRank);
|
||||
break;
|
||||
case NPC:
|
||||
@@ -114,7 +113,7 @@ public class SetRankCmd extends AbstractDevCmd {
|
||||
|
||||
// Set the current targetRank
|
||||
int lastMeshID = targetBuilding.getMeshUUID();
|
||||
targetBuilding.setRank(targetRank);
|
||||
BuildingManager.setRank(targetBuilding, targetRank);
|
||||
|
||||
if (lastMeshID != targetBuilding.getMeshUUID())
|
||||
targetBuilding.refresh(true);
|
||||
|
||||
Reference in New Issue
Block a user