mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-23 07:41:29 +01:00
Bump deps
Del
This commit is contained in:
parent
eb546777de
commit
7f6b6df4cf
@ -137,7 +137,7 @@
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bukkit</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -308,32 +308,32 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
.relocate("gnu{}trove", "clib{}trove").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-minimessage")
|
||||
.version("4.14.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-bukkit").version("4.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-api").version("4.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-facet").version("4.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-viaversion")
|
||||
.version("4.3.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-api").version("4.14.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-bungeecord")
|
||||
.version("4.3.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-legacy")
|
||||
.version("4.13.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson")
|
||||
.version("4.13.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson-legacy-impl")
|
||||
.version("4.13.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-nbt").version("4.13.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-key").version("4.14.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-api").version("1.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-bukkit").version("4.3.1")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-api").version("4.3.1")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-bungeecord")
|
||||
.version("4.3.1").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-legacy")
|
||||
.version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-nbt").version("4.13.1")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson")
|
||||
.version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson-legacy-impl")
|
||||
.version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-facet").version("4.3.1")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-viaversion")
|
||||
.version("4.3.1").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
try {
|
||||
Class.forName("org.joml.Vector3f");
|
||||
} catch (Throwable t) {
|
||||
|
@ -59,7 +59,6 @@ import org.bukkit.event.world.EntitiesLoadEvent;
|
||||
import org.bukkit.event.world.EntitiesUnloadEvent;
|
||||
import org.bukkit.event.world.WorldLoadEvent;
|
||||
import org.bukkit.event.world.WorldUnloadEvent;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.RegisteredListener;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
@ -586,14 +585,13 @@ public class EventListen implements Listener {
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onPlayerTeleport(final PlayerTeleportEvent event) {
|
||||
NPC npc = CitizensAPI.getNPCRegistry().getNPC(event.getPlayer());
|
||||
if (event.getCause() == TeleportCause.PLUGIN && !event.getPlayer().hasMetadata("citizens-force-teleporting")
|
||||
&& npc != null && Setting.PLAYER_TELEPORT_DELAY.asTicks() > 0) {
|
||||
if (event.getCause() == TeleportCause.PLUGIN && npc != null && !npc.data().has("citizens-force-teleporting")
|
||||
&& Setting.PLAYER_TELEPORT_DELAY.asTicks() > 0) {
|
||||
event.setCancelled(true);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), () -> {
|
||||
event.getPlayer().setMetadata("citizens-force-teleporting",
|
||||
new FixedMetadataValue(CitizensAPI.getPlugin(), true));
|
||||
npc.data().set("citizens-force-teleporting", true);
|
||||
event.getPlayer().teleport(event.getTo());
|
||||
event.getPlayer().removeMetadata("citizens-force-teleporting", CitizensAPI.getPlugin());
|
||||
npc.data().remove("citizens-force-teleporting");
|
||||
}, Setting.PLAYER_TELEPORT_DELAY.asTicks());
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ public class EditorCommands {
|
||||
public void equip(CommandContext args, Player player, NPC npc) throws CommandException {
|
||||
if (!npc.isSpawned())
|
||||
throw new CommandException("NPC must be spawned");
|
||||
|
||||
Editor.enterOrLeave(player, new EquipmentEditor(player, npc));
|
||||
}
|
||||
|
||||
@ -54,10 +55,12 @@ public class EditorCommands {
|
||||
Editor editor = npc.getOrAddTrait(Waypoints.class).getEditor(player, args);
|
||||
if (editor == null)
|
||||
return;
|
||||
|
||||
if (player.isConversing() && args.argsLength() > 1) {
|
||||
player.acceptConversationInput(args.getJoinedStrings(1));
|
||||
return;
|
||||
}
|
||||
|
||||
Editor.enterOrLeave(player, editor);
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ public class NPCCommands {
|
||||
try {
|
||||
int id = commands.addCommand(new NPCCommandBuilder(command, hand).addPerms(perms)
|
||||
.player(args.hasFlag('p') || args.hasFlag('o')).op(args.hasFlag('o')).cooldown(cooldown)
|
||||
.globalCooldown(gcooldown).n(n).delay(Util.toTicks(delay)));
|
||||
.globalCooldown(gcooldown).n(n).delay(delay));
|
||||
Messaging.sendTr(sender, Messages.COMMAND_ADDED, command, id);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new CommandException(CommandMessages.INVALID_NUMBER);
|
||||
@ -733,7 +733,6 @@ public class NPCCommands {
|
||||
if (args.hasFlag('t') || temporaryTicks != null) {
|
||||
registry = temporaryRegistry;
|
||||
}
|
||||
|
||||
if (item != null) {
|
||||
ItemStack stack = Util.parseItemStack(null, item);
|
||||
npc = registry.createNPCUsingItem(type, name, stack);
|
||||
|
@ -82,30 +82,42 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
NPCDespawnEvent event = new NPCDespawnEvent(this, reason);
|
||||
if (reason == DespawnReason.CHUNK_UNLOAD) {
|
||||
event.setCancelled(data().get(NPC.Metadata.KEEP_CHUNK_LOADED, Setting.KEEP_CHUNKS_LOADED.asBoolean()));
|
||||
}
|
||||
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() && reason != DespawnReason.DEATH) {
|
||||
Messaging.debug("Couldn't despawn", this, "due to despawn event cancellation. Will load chunk.",
|
||||
getEntity().isValid(), ", DespawnReason." + reason);
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean keepSelected = getOrAddTrait(Spawned.class).shouldSpawn();
|
||||
if (!keepSelected) {
|
||||
data().remove("selectors");
|
||||
}
|
||||
|
||||
if (getEntity() != null) {
|
||||
getEntity().removeMetadata("NPC", CitizensAPI.getPlugin());
|
||||
getEntity().removeMetadata("NPC-ID", CitizensAPI.getPlugin());
|
||||
}
|
||||
|
||||
if (getEntity() instanceof Player) {
|
||||
PlayerUpdateTask.deregisterPlayer(getEntity());
|
||||
}
|
||||
|
||||
navigator.onDespawn();
|
||||
if (reason == DespawnReason.RELOAD) {
|
||||
unloadEvents();
|
||||
}
|
||||
|
||||
for (Trait trait : new ArrayList<Trait>(traits.values())) {
|
||||
trait.onDespawn(reason);
|
||||
}
|
||||
|
||||
Messaging.debug("Despawned", this, "DespawnReason." + reason);
|
||||
|
||||
if (getEntity() instanceof SkinnableEntity) {
|
||||
@ -117,6 +129,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
} else {
|
||||
entityController.remove();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -330,6 +343,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
Bukkit.getPluginManager().callEvent(new NPCNeedsRespawnEvent(this, at));
|
||||
return false;
|
||||
}
|
||||
|
||||
// send skin packets, if applicable, before other NMS packets are sent
|
||||
SkinnableEntity skinnable = getEntity() instanceof SkinnableEntity ? ((SkinnableEntity) getEntity()) : null;
|
||||
if (skinnable != null) {
|
||||
|
@ -682,8 +682,8 @@ public class CommandTrait extends Trait {
|
||||
return this;
|
||||
}
|
||||
|
||||
public NPCCommandBuilder delay(int delay) {
|
||||
this.delay = delay;
|
||||
public NPCCommandBuilder delay(Duration delay) {
|
||||
this.delay = Util.toTicks(delay);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -838,12 +838,12 @@ public class CommandTrait extends Trait {
|
||||
commandKeys.add(commandKey);
|
||||
Number number = lastUsed.get(commandKey);
|
||||
if (number != null && number.longValue() + (command.cooldown != 0 ? command.cooldown
|
||||
: Setting.NPC_COMMAND_GLOBAL_COMMAND_COOLDOWN.asSeconds()) <= currentTimeSec) {
|
||||
: Setting.NPC_COMMAND_GLOBAL_COMMAND_COOLDOWN.asSeconds()) < currentTimeSec) {
|
||||
lastUsed.remove(commandKey);
|
||||
}
|
||||
if (globalCooldowns != null) {
|
||||
number = globalCooldowns.get(commandKey);
|
||||
if (number != null && number.longValue() + command.globalCooldown <= currentTimeSec) {
|
||||
if (number != null && number.longValue() + command.globalCooldown < currentTimeSec) {
|
||||
globalCooldowns.remove(commandKey);
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ public enum PlayerAnimation {
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
NMS.playAnimation(PlayerAnimation.STOP_USE_ITEM, player, radius);
|
||||
NMS.playAnimation(PlayerAnimation.this, player, radius);
|
||||
if (!player.hasMetadata("citizens-using-item-id")) {
|
||||
|
@ -405,7 +405,7 @@ citizens.editors.text.range-set=[[Range]] set to [[{0}]].
|
||||
citizens.editors.text.delay-set=[[Delay]] set to [[{0}]] ticks.
|
||||
citizens.editors.text.realistic-looking-set=[[Realistic looking]] set to [[{0}]].
|
||||
citizens.editors.text.speech-bubbles-set=[[Speech bubbles]] set to [[{0}]].
|
||||
citizens.editors.text.start-prompt=<click:suggest_command:add ><yellow>Add text</click> | <click:suggest_command:item ><hover:show_text:"Set the talk item in hand pattern (set to <yellow>default</yellow> to clear)"><yellow><u>item</hover></click> | <click:suggest_command:range ><hover:show_text:Set the talking range in blocks><yellow><u>range</hover></click> | <click:suggest_command:delay ><hover:show_text:Set the talking delay in ticks><yellow><u>delay</u></yellow></hover></click><br><click:run_command:/npc text close><hover:show_text:Toggle sending messages when players get close>{0}<u>talk close</hover></click> | <click:run_command:/npc text random><hover:show_text:Toggle random talking>{1}<u>random</hover></click> | <click:run_command:/npc text speech bubbles><hover:show_text:Toggle showing text as holograms instead of chat messages>{2}<u>speech bubbles</hover></click> | <click:run_command:/npc text realistic looking><hover:show_text:Toggle requiring line of sight before speaking>{3}<u>realistic</hover></click>
|
||||
citizens.editors.text.start-prompt=<click:suggest_command:add ><yellow><u>Add text</u></click> | <click:suggest_command:item ><hover:show_text:"Set the talk item in hand pattern (set to <yellow>default</yellow> to clear)"><yellow><u>item</hover></click> | <click:suggest_command:range ><hover:show_text:Set the talking range in blocks><yellow><u>range</hover></click> | <click:suggest_command:delay ><hover:show_text:Set the talking delay in ticks><yellow><u>delay</u></yellow></hover></click><br><click:run_command:/npc text close><hover:show_text:Toggle sending messages when players get close>{0}<u>talk close</hover></click> | <click:run_command:/npc text random><hover:show_text:Toggle random talking>{1}<u>random</hover></click> | <click:run_command:/npc text speech bubbles><hover:show_text:Toggle showing text as holograms instead of chat messages>{2}<u>speech bubbles</hover></click> | <click:run_command:/npc text realistic looking><hover:show_text:Toggle requiring line of sight before speaking>{3}<u>realistic</hover></click>
|
||||
citizens.editors.text.talk-item-set=[[Talk item pattern]] set to [[{0}]].
|
||||
citizens.editors.text.text-list-header=Current text:
|
||||
citizens.editors.waypoints.wander.editing-regions-stop=Exited the region editor.
|
||||
|
Loading…
Reference in New Issue
Block a user