mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
chore: remove poorly implemented /ps debug loadedchunks command (#4180)
- the same (but correctly implemented) functionality exists in other plugins - closes #4140
This commit is contained in:
parent
44b1127181
commit
b00a46b286
@ -29,7 +29,6 @@ import com.plotsquared.core.util.WorldUtil;
|
|||||||
import com.plotsquared.core.util.entity.EntityCategories;
|
import com.plotsquared.core.util.entity.EntityCategories;
|
||||||
import com.plotsquared.core.util.entity.EntityCategory;
|
import com.plotsquared.core.util.entity.EntityCategory;
|
||||||
import com.plotsquared.core.util.query.PlotQuery;
|
import com.plotsquared.core.util.query.PlotQuery;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
|
||||||
import com.plotsquared.core.uuid.UUIDMapping;
|
import com.plotsquared.core.uuid.UUIDMapping;
|
||||||
import com.sk89q.worldedit.world.entity.EntityType;
|
import com.sk89q.worldedit.world.entity.EntityType;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -71,7 +70,7 @@ public class Debug extends SubCommand {
|
|||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
TagResolver.resolver(
|
TagResolver.resolver(
|
||||||
"value",
|
"value",
|
||||||
Tag.inserting(Component.text("/plot debug <loadedchunks | player | debug-players | entitytypes | msg>"))
|
Tag.inserting(Component.text("/plot debug <player | debug-players | entitytypes | msg>"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -85,16 +84,6 @@ public class Debug extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (args.length > 0 && "loadedchunks".equalsIgnoreCase(args[0])) {
|
|
||||||
final long start = System.currentTimeMillis();
|
|
||||||
player.sendMessage(TranslatableCaption.of("debug.fetching_loaded_chunks"));
|
|
||||||
TaskManager.runTaskAsync(() -> player.sendMessage(StaticCaption
|
|
||||||
.of("Loaded chunks: " + this.worldUtil
|
|
||||||
.getChunkChunks(player.getLocation().getWorldName())
|
|
||||||
.size() + " (" + (System.currentTimeMillis()
|
|
||||||
- start) + "ms) using thread: " + Thread.currentThread().getName())));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length > 0 && "uuids".equalsIgnoreCase(args[0])) {
|
if (args.length > 0 && "uuids".equalsIgnoreCase(args[0])) {
|
||||||
final Collection<UUIDMapping> mappings = PlotSquared.get().getImpromptuUUIDPipeline().getAllImmediately();
|
final Collection<UUIDMapping> mappings = PlotSquared.get().getImpromptuUUIDPipeline().getAllImmediately();
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
@ -196,7 +185,7 @@ public class Debug extends SubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Command> tab(final PlotPlayer<?> player, String[] args, boolean space) {
|
public Collection<Command> tab(final PlotPlayer<?> player, String[] args, boolean space) {
|
||||||
return Stream.of("loadedchunks", "debug-players", "entitytypes")
|
return Stream.of("debug-players", "entitytypes")
|
||||||
.filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH)))
|
.filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH)))
|
||||||
.map(value -> new Command(null, false, value, "plots.admin", RequiredType.NONE, null) {
|
.map(value -> new Command(null, false, value, "plots.admin", RequiredType.NONE, null) {
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
Loading…
Reference in New Issue
Block a user