From 80c1f18c708935282407674337932d0176d69fc7 Mon Sep 17 00:00:00 2001 From: MATRIX-feather Date: Sat, 4 Jan 2025 16:11:45 +0800 Subject: [PATCH] misc: Legacy permission nodes support is now ended! --- .../morph/events/CommonEventProcessor.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java b/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java index f1157874..9a356e2e 100644 --- a/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java +++ b/src/main/java/xyz/nifeather/morph/events/CommonEventProcessor.java @@ -369,27 +369,27 @@ public void onPlayerJoin(PlayerJoinEvent e) clientHandler.markPlayerReady(player); var effectivePermissions = new ObjectOpenHashSet<>(player.getEffectivePermissions()); - var permissionAttachment = player.addAttachment(plugin); List legacyPermissions = new ObjectArrayList<>(); effectivePermissions.forEach(permInfo -> { var name = permInfo.getPermission(); - boolean value = permInfo.getValue(); - if (!name.startsWith("xiamomc.morph")) return; - String nameReplaced = name.replace("xiamomc.morph.", "feathermorph."); - permissionAttachment.setPermission(nameReplaced, value); legacyPermissions.add(name); }); if (!legacyPermissions.isEmpty()) { - logger.warn("Found legacy permission set for player '%s'!".formatted(player.getName())); - logger.warn("Please migrate to the new prefix 'feathermorph.XXX' rather than 'xiamomc.morph.XXX' as soon as possible, as legacy support will end at 1.5.0!"); - logger.warn("Permissions found:"); - legacyPermissions.forEach(p -> logger.warn(" --> %s".formatted(p))); + logger.error("- x - x - x - x - x - x - x - x - x - x - x - x -"); + logger.error("MAY I HAVE YOUR ATTENTION PLEASE!"); + logger.error(""); + logger.error("Found legacy permission set for player '%s'!".formatted(player.getName())); + logger.error("Please migrate to the new prefix 'feathermorph.XXX' instead of 'xiamomc.morph.XXX', as legacy permission support is now ENDED!"); + logger.error("Permissions found:"); + legacyPermissions.forEach(p -> logger.error(" --> %s".formatted(p))); + logger.error(""); + logger.error("- x - x - x - x - x - x - x - x - x - x - x - x -"); } //如果玩家是第一次用客户端连接,那么等待3秒向其发送提示