mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-03 14:11:23 +01:00
Fix more checkstyles and use LinkedHashMap for info command
This commit is contained in:
parent
896524b57a
commit
41f9989eef
@ -1,6 +1,6 @@
|
|||||||
package org.mvplugins.multiverse.core.commands;
|
package org.mvplugins.multiverse.core.commands;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import co.aikar.commands.InvalidCommandArgument;
|
import co.aikar.commands.InvalidCommandArgument;
|
||||||
@ -31,7 +31,6 @@ import org.mvplugins.multiverse.core.display.handlers.PagedSendHandler;
|
|||||||
import org.mvplugins.multiverse.core.display.parsers.MapContentProvider;
|
import org.mvplugins.multiverse.core.display.parsers.MapContentProvider;
|
||||||
import org.mvplugins.multiverse.core.economy.MVEconomist;
|
import org.mvplugins.multiverse.core.economy.MVEconomist;
|
||||||
import org.mvplugins.multiverse.core.world.LoadedMultiverseWorld;
|
import org.mvplugins.multiverse.core.world.LoadedMultiverseWorld;
|
||||||
import org.mvplugins.multiverse.core.world.WorldManager;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CommandAlias("mv")
|
@CommandAlias("mv")
|
||||||
@ -61,18 +60,15 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
})
|
})
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
private final WorldManager worldManager;
|
|
||||||
private final LocationManipulation locationManipulation;
|
private final LocationManipulation locationManipulation;
|
||||||
private final MVEconomist economist;
|
private final MVEconomist economist;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
InfoCommand(
|
InfoCommand(
|
||||||
@NotNull MVCommandManager commandManager,
|
@NotNull MVCommandManager commandManager,
|
||||||
@NotNull WorldManager worldManager,
|
|
||||||
@NotNull LocationManipulation locationManipulation,
|
@NotNull LocationManipulation locationManipulation,
|
||||||
@NotNull MVEconomist economist) {
|
@NotNull MVEconomist economist) {
|
||||||
super(commandManager);
|
super(commandManager);
|
||||||
this.worldManager = worldManager;
|
|
||||||
this.locationManipulation = locationManipulation;
|
this.locationManipulation = locationManipulation;
|
||||||
this.economist = economist;
|
this.economist = economist;
|
||||||
}
|
}
|
||||||
@ -82,7 +78,7 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
@CommandCompletion("@mvworlds:scope=both")
|
@CommandCompletion("@mvworlds:scope=both")
|
||||||
@Syntax("")
|
@Syntax("")
|
||||||
@Description("{@@mv-core.info.description")
|
@Description("{@@mv-core.info.description")
|
||||||
public void onImportCommand(
|
public void onInfoCommand(
|
||||||
|
|
||||||
@NotNull MVCommandIssuer issuer,
|
@NotNull MVCommandIssuer issuer,
|
||||||
|
|
||||||
@ -110,7 +106,7 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> getInfo(LoadedMultiverseWorld world) {
|
private Map<String, String> getInfo(LoadedMultiverseWorld world) {
|
||||||
Map<String, String> outMap = new HashMap<>();
|
Map<String, String> outMap = new LinkedHashMap<>();
|
||||||
|
|
||||||
outMap.put("World Name", world.getName());
|
outMap.put("World Name", world.getName());
|
||||||
outMap.put("World Alias", world.getAlias());
|
outMap.put("World Alias", world.getAlias());
|
||||||
@ -139,8 +135,8 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
return "tmp";
|
return "tmp";
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> getAnimalMap(LoadedMultiverseWorld world) {
|
private Map<String, String> getAnimalMap(LoadedMultiverseWorld world) {
|
||||||
Map<String, String> outMap = new HashMap<>();
|
Map<String, String> outMap = new LinkedHashMap<>();
|
||||||
|
|
||||||
if (world.getSpawningAnimals()) {
|
if (world.getSpawningAnimals()) {
|
||||||
outMap.put("Spawning Animals", "ALL");
|
outMap.put("Spawning Animals", "ALL");
|
||||||
@ -156,7 +152,7 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> getMonsterMap(LoadedMultiverseWorld world) {
|
private Map<String, String> getMonsterMap(LoadedMultiverseWorld world) {
|
||||||
Map<String, String> outMap = new HashMap<>();
|
Map<String, String> outMap = new LinkedHashMap<>();
|
||||||
|
|
||||||
if (world.getSpawningMonsters()) {
|
if (world.getSpawningMonsters()) {
|
||||||
outMap.put("Spawning Monsters", "ALL");
|
outMap.put("Spawning Monsters", "ALL");
|
||||||
@ -172,7 +168,7 @@ class InfoCommand extends MultiverseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> getPriceMap(LoadedMultiverseWorld world) {
|
private Map<String, String> getPriceMap(LoadedMultiverseWorld world) {
|
||||||
Map<String, String> outMap = new HashMap<>();
|
Map<String, String> outMap = new LinkedHashMap<>();
|
||||||
double price = world.getPrice();
|
double price = world.getPrice();
|
||||||
|
|
||||||
if (price == 0) {
|
if (price == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user