mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Update skins to be persistent by default (this is retroactive) - use /npc skin -l instead for continuously updating skins
This commit is contained in:
parent
9ac4ef3feb
commit
3fafa7a255
@ -107,7 +107,7 @@ public class Settings {
|
||||
NPC_COST("economy.npc.cost", 100D),
|
||||
NPC_SKIN_RETRY_DELAY("npc.skins.retry-delay", 120),
|
||||
NPC_SKIN_ROTATION_UPDATE_DEGREES("npc.skins.rotation-update-degrees", 90f),
|
||||
NPC_SKIN_USE_LATEST("npc.skins.use-latest", true),
|
||||
NPC_SKIN_USE_LATEST("npc.skins.use-latest-by-default", false),
|
||||
NPC_SKIN_VIEW_DISTANCE("npc.skins.view-distance", 100D),
|
||||
PACKET_UPDATE_DELAY("npc.packets.update-delay", 30),
|
||||
QUICK_SELECT("npc.selection.quick-select", false),
|
||||
|
@ -1515,12 +1515,12 @@ public class NPCCommands {
|
||||
|
||||
@Command(
|
||||
aliases = { "npc" },
|
||||
usage = "skin (-c -p -f) [name]",
|
||||
desc = "Sets an NPC's skin name. Use -p to save a skin snapshot that won't change",
|
||||
usage = "skin (-c -l(atest)) [name]",
|
||||
desc = "Sets an NPC's skin name. Use -l to set the skin to always update to the latest",
|
||||
modifiers = { "skin" },
|
||||
min = 1,
|
||||
max = 2,
|
||||
flags = "cp",
|
||||
flags = "cl",
|
||||
permission = "citizens.npc.skin")
|
||||
@Requirements(types = EntityType.PLAYER, selected = true, ownership = true)
|
||||
public void skin(final CommandContext args, final CommandSender sender, final NPC npc) throws CommandException {
|
||||
@ -1531,8 +1531,8 @@ public class NPCCommands {
|
||||
if (args.argsLength() != 2)
|
||||
throw new CommandException(Messages.SKIN_REQUIRED);
|
||||
npc.data().setPersistent(NPC.PLAYER_SKIN_UUID_METADATA, args.getString(1));
|
||||
if (args.hasFlag('p')) {
|
||||
npc.data().setPersistent(NPC.PLAYER_SKIN_USE_LATEST, false);
|
||||
if (args.hasFlag('l')) {
|
||||
npc.data().setPersistent(NPC.PLAYER_SKIN_USE_LATEST, true);
|
||||
}
|
||||
skinName = args.getString(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user