mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Merge branch 'main' into fix/folia-visibility-issues
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -35,6 +35,8 @@ public interface FancyNpcsConfig {
|
||||
|
||||
int getRemoveNpcsFromPlayerlistDelay();
|
||||
|
||||
boolean isSwingArmOnUpdate();
|
||||
|
||||
String getMineSkinApiKey();
|
||||
|
||||
List<String> getBlockedCommands();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ public class NpcModifyEvent extends Event implements Cancellable {
|
||||
LOCATION,
|
||||
MIRROR_SKIN,
|
||||
PLAYER_COMMAND,
|
||||
ROTATION,
|
||||
SERVER_COMMAND,
|
||||
SHOW_IN_TAB,
|
||||
SKIN,
|
||||
|
||||
Reference in New Issue
Block a user