mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
fix purge <owner>
This commit is contained in:
parent
07491d8028
commit
3be370071c
@ -39,6 +39,7 @@ import com.plotsquared.core.plot.world.PlotAreaManager;
|
|||||||
import com.plotsquared.core.util.StringMan;
|
import com.plotsquared.core.util.StringMan;
|
||||||
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.util.task.TaskManager;
|
||||||
|
import com.plotsquared.core.uuid.UUIDMapping;
|
||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -118,25 +119,27 @@ public class Purge extends SubCommand {
|
|||||||
break;
|
break;
|
||||||
case "owner":
|
case "owner":
|
||||||
case "o":
|
case "o":
|
||||||
owner = PlotSquared.get().getImpromptuUUIDPipeline().getSingle(split[1], Settings.UUID.BLOCKING_TIMEOUT);
|
UUIDMapping ownerMapping = PlotSquared.get().getImpromptuUUIDPipeline().getImmediately(split[1]);
|
||||||
if (owner == null) {
|
if (ownerMapping == null) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("errors.invalid_player"),
|
TranslatableCaption.of("errors.invalid_player"),
|
||||||
Template.of("value", split[1])
|
Template.of("value", split[1])
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
owner = ownerMapping.getUuid();
|
||||||
break;
|
break;
|
||||||
case "shared":
|
case "shared":
|
||||||
case "s":
|
case "s":
|
||||||
added = PlotSquared.get().getImpromptuUUIDPipeline().getSingle(split[1], Settings.UUID.BLOCKING_TIMEOUT);
|
UUIDMapping addedMapping = PlotSquared.get().getImpromptuUUIDPipeline().getImmediately(split[1]);
|
||||||
if (added == null) {
|
if (addedMapping == null) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("errors.invalid_player"),
|
TranslatableCaption.of("errors.invalid_player"),
|
||||||
Template.of("value", split[1])
|
Template.of("value", split[1])
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
owner = addedMapping.getUuid();
|
||||||
break;
|
break;
|
||||||
case "clear":
|
case "clear":
|
||||||
case "c":
|
case "c":
|
||||||
|
Loading…
Reference in New Issue
Block a user