Merge branch 'main' into fix/folia-visibility-issues

This commit is contained in:
Oliver
2025-11-18 11:33:10 +01:00
committed by GitHub
161 changed files with 4456 additions and 485 deletions

View File

@@ -13,7 +13,7 @@ dependencies {
compileOnly(project(":libraries:config"))
compileOnly("de.oliver.FancyAnalytics:logger:0.0.8")
implementation("org.lushplugins:ChatColorHandler:6.0.2")
implementation("org.lushplugins:ChatColorHandler:6.0.0")
}
tasks {

View File

@@ -35,6 +35,8 @@ public interface FancyNpcsConfig {
int getRemoveNpcsFromPlayerlistDelay();
boolean isSwingArmOnUpdate();
String getMineSkinApiKey();
List<String> getBlockedCommands();

View File

@@ -132,7 +132,7 @@ public abstract class Npc {
public abstract void update(Player player, boolean swingArm);
public void update(Player player) {
update(player, true);
update(player, FancyNpcsPlugin.get().getFancyNpcConfig().isSwingArmOnUpdate());
}
public void updateForAll(boolean swingArm) {
@@ -142,13 +142,13 @@ public abstract class Npc {
}
public void updateForAll() {
updateForAll(true);
updateForAll(FancyNpcsPlugin.get().getFancyNpcConfig().isSwingArmOnUpdate());
}
public abstract void move(Player player, boolean swingArm);
public void move(Player player) {
move(player, true);
move(player, FancyNpcsPlugin.get().getFancyNpcConfig().isSwingArmOnUpdate());
}
public void moveForAll(boolean swingArm) {
@@ -158,7 +158,7 @@ public abstract class Npc {
}
public void moveForAll() {
moveForAll(true);
moveForAll(FancyNpcsPlugin.get().getFancyNpcConfig().isSwingArmOnUpdate());
}
public void interact(Player player) {

View File

@@ -20,7 +20,13 @@ public class NeedPermissionAction extends NpcAction {
return;
}
if (!context.getPlayer().hasPermission(value)) {
boolean invertCheck = value.startsWith("!");
String permission = invertCheck ? value.substring(1) : value;
boolean hasPermission = context.getPlayer().hasPermission(permission);
boolean passesCheck = invertCheck ? !hasPermission : hasPermission;
if (!passesCheck) {
FancyNpcsPlugin.get().getTranslator().translate("action_missing_permissions").send(context.getPlayer());
context.terminate();
}

View File

@@ -90,6 +90,7 @@ public class NpcModifyEvent extends Event implements Cancellable {
LOCATION,
MIRROR_SKIN,
PLAYER_COMMAND,
ROTATION,
SERVER_COMMAND,
SHOW_IN_TAB,
SKIN,