diff --git a/build.gradle.kts b/build.gradle.kts index d8fade0..962ea6a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,7 @@ repositories { } dependencies { - compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.20.6-R0.1-SNAPSHOT") + compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.21.1-R0.1-SNAPSHOT") compileOnly(group = "com.sk89q.worldedit", name = "worldedit-core", version = "7.1.0") compileOnly(group = "com.sk89q.worldguard", name = "worldguard-bukkit", version = "7.0.0") compileOnly(group = "com.palmergames.bukkit.towny", name = "towny", version = "0.98.2.0") diff --git a/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java b/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java index c62bf16..9eb173e 100644 --- a/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java +++ b/src/main/java/com/griefcraft/util/matchers/DoorMatcher.java @@ -113,6 +113,24 @@ public class DoorMatcher implements ProtectionFinder.Matcher { WOODEN_TRAP_DOORS.addAll(EnumSet.of(Material.BAMBOO_TRAPDOOR, Material.CHERRY_TRAPDOOR)); PRESSURE_PLATES.addAll(EnumSet.of(Material.BAMBOO_PRESSURE_PLATE, Material.CHERRY_PRESSURE_PLATE)); } + if (VersionUtil.getMinorVersion() > 20) { + PROTECTABLES_DOORS.addAll(EnumSet.of(Material.COPPER_DOOR, Material.EXPOSED_COPPER_DOOR, + Material.OXIDIZED_COPPER_DOOR, Material.WAXED_COPPER_DOOR, Material.WEATHERED_COPPER_DOOR, + Material.WAXED_EXPOSED_COPPER_DOOR, Material.WAXED_OXIDIZED_COPPER_DOOR, + Material.WAXED_WEATHERED_COPPER_DOOR)); + WOODEN_DOORS.addAll(EnumSet.of(Material.COPPER_DOOR, Material.EXPOSED_COPPER_DOOR, + Material.OXIDIZED_COPPER_DOOR, Material.WAXED_COPPER_DOOR, Material.WEATHERED_COPPER_DOOR, + Material.WAXED_EXPOSED_COPPER_DOOR, Material.WAXED_OXIDIZED_COPPER_DOOR, + Material.WAXED_WEATHERED_COPPER_DOOR)); + TRAP_DOORS.addAll(EnumSet.of(Material.COPPER_TRAPDOOR, Material.EXPOSED_COPPER_TRAPDOOR, + Material.OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_COPPER_TRAPDOOR, + Material.WEATHERED_COPPER_TRAPDOOR, Material.WAXED_EXPOSED_COPPER_TRAPDOOR, + Material.WAXED_OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_WEATHERED_COPPER_TRAPDOOR)); + WOODEN_TRAP_DOORS.addAll(EnumSet.of(Material.COPPER_TRAPDOOR, Material.EXPOSED_COPPER_TRAPDOOR, + Material.OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_COPPER_TRAPDOOR, + Material.WEATHERED_COPPER_TRAPDOOR, Material.WAXED_EXPOSED_COPPER_TRAPDOOR, + Material.WAXED_OXIDIZED_COPPER_TRAPDOOR, Material.WAXED_WEATHERED_COPPER_TRAPDOOR)); + } } public boolean matches(ProtectionFinder finder) { diff --git a/src/main/resources/config/core.yml b/src/main/resources/config/core.yml index 92a9f93..339346a 100644 --- a/src/main/resources/config/core.yml +++ b/src/main/resources/config/core.yml @@ -310,6 +310,22 @@ protections: enabled: true cherry_door: enabled: true + copper_door: + enabled: true + exposed_copper_door: + enabled: true + oxidized_copper_door: + enabled: true + weathered_copper_door: + enabled: true + waxed_copper_door: + enabled: true + waxed_exposed_copper_door: + enabled: true + waxed_oxidized_copper_door: + enabled: true + waxed_weathered_copper_door: + enabled: true iron_trapdoor: enabled: true oak_trapdoor: @@ -334,6 +350,22 @@ protections: enabled: true cherry_trapdoor: enabled: true + copper_trapdoor: + enabled: true + exposed_copper_trapdoor: + enabled: true + oxidized_copper_trapdoor: + enabled: true + weathered_copper_trapdoor: + enabled: true + waxed_copper_trapdoor: + enabled: true + waxed_exposed_copper_trapdoor: + enabled: true + waxed_oxidized_copper_trapdoor: + enabled: true + waxed_weathered_copper_trapdoor: + enabled: true oak_fence_gate: enabled: true spruce_fence_gate: diff --git a/src/main/resources/lang/lwc_cn.properties b/src/main/resources/lang/lwc_cn.properties index 3b048e0..c98dbc5 100644 --- a/src/main/resources/lang/lwc_cn.properties +++ b/src/main/resources/lang/lwc_cn.properties @@ -89,7 +89,7 @@ protection.create.finalize=\ # Info protection.info.finalize=%dark_aqua%点击查看保护详情 -protection.info.limits=%dark_aqua%你正在使用%dark_red% %used%%dark_aqua%中的%dark_green% %quota%%dark_aqua%包含方式。 +protection.info.limits=%dark_aqua%你正在使用%dark_red% %used%%dark_aqua%中的%dark_green% %quota%%dark_aqua%保护方式。 # Flag protection.flag.invalidflag=%dark_red%标记%white% %flag%%dark_red%没有被找到 @@ -106,7 +106,7 @@ protection.owners.finalize=%dark_aqua%点击查看谁有保护权限 # Remove protection.remove.protection.finalize=%dark_aqua%点击你正在保护的物品以解除锁定 -protection.remove.modes.finalize=成功移除了所有包含设定 +protection.remove.modes.finalize=成功移除了所有保护设定 # Menu protection.menu.finalize=你的菜单样式已被设置为%dark_aqua% %style% @@ -182,10 +182,10 @@ protection.admin.update.updated=\ %dark_green%请重载LWC配置文件以应用升级 protection.admin.update.noupdate=%dark_red%没有发现新版本。 -protection.admin.limit.global=%dark_green%Registered global limit of%gold% %limit%%dark_green% protections. -protection.admin.limit.group=%dark_green%Registered limit of%gold% %limit%%dark_green% protections to the group %name% -protection.admin.limit.player=%dark_green%Registered limit of%gold% %limit%%dark_green% protections to the player %name% -protection.admin.limit.remove=%dark_red%Unregistered limit for%gold% %name% +protection.admin.limit.global=%dark_green%全局等级保护限制为%gold% %limit%%dark_green% +protection.admin.limit.group=%dark_green%组内保护登记限制为%gold% %limit%%dark_green% 权限组名:%name% +protection.admin.limit.player=%dark_green%玩家%name%的保护数量限制为%gold%%limit%%dark_geen% +protection.admin.limit.remove=%dark_red%剩下的保护的数量是%gold% %name% protection.admin.clear.protections=%dark_green%删除所有保护和权限。 protection.admin.clear.rights=%dark_green%删除所有保护权限。 @@ -202,7 +202,7 @@ protection.admin.expire.removed=%dark_green%已使%count%保护过期。 ## Interaction ## ################## -protection.interact.error.blocked=%dark_red%服务器管理员阻止你打开那个! +protection.interact.error.blocked=%dark_red%op阻止你打开这个捏 protection.interact.error.notregistered=%dark_red%这个%block%没有被锁定! protection.interact.error.alreadyregistered=%dark_red%你已经锁定过%block%了! protection.interact.error.notowner=%dark_red%这个%block%不属于你! @@ -226,7 +226,7 @@ protection.interact.flag.remove=%dark_red%成功移除%dark_aqua% %flag%%dark_re # Creation protection.interact.create.password=%dark_aqua%为了方便起见,你在下次登陆前都不用输入密码了。 -protection.interact.create.finalize=%dark_green%成功创建了包含。 +protection.interact.create.finalize=%dark_green%成功创建了保护。 # Removal protection.interact.remove.finalize=%dark_green%成功移除了%block%上面的锁 @@ -403,7 +403,7 @@ protection.limits=\ ########### protection.doors.open=%dark_green%门被吱呀一声打开。。。 -protection.doors.close=%dark_green%砰的一声,门被关上了! +protection.doors.close=%dark_green%boom~的一声,门被关上了! ########## ## 3.40 ## @@ -416,10 +416,10 @@ protection.modes.nospam.off=%dark_green%保护创建消息将再次显示。 ## 4.0.0 ## ########### -protection.interact.rights.register.towny=%dark_green%Registered rights for the Town%gold% %name% %isadmin% -protection.interact.rights.remove.towny=%dark_green%Removed rights from the Town%gold% %name% %isadmin% -protection.interact.rights.register.item=%dark_green%Registered rights for the Item%gold% %name% %isadmin% -protection.interact.rights.remove.item=%dark_green%Removed rights from the Item%gold% %name% %isadmin% +protection.interact.rights.register.towny=%dark_green%城镇的所有人为%gold% %name% %isadmin% +protection.interact.rights.remove.towny=%dark_green%从城镇中删除了所有权%gold% %name% %isadmin% +protection.interact.rights.register.item=%dark_green%物品的所有权%gold% %name% %isadmin% +protection.interact.rights.remove.item=%dark_green%已将物品所有权删除%gold% %name% %isadmin% lwc.blockedmessage=%dark_red%LWC已经拦截了你这条包含密码的消息! lwc.pendingaction=%dark_red%[LWC]您有一个待执行的动作,但另一个插件取消了它! @@ -455,14 +455,14 @@ lwc.setup.database.invalid=%dark_red%切换的数据库是无效的数据库类 lwc.setup.database.success=%dark_green%成功转换数据库为 %type%. lwc.setup.database.failure=%dark_red%将数据库类型转换为 %type% 时发生了问题, 请查看后台. -lwc.worldguard.needbuildrights=%dark_red%You need build rights in this region to protect with LWC. -lwc.worldguard.notallowed=%dark_red%LWC protections are not allowed outside of WorldGuard regions! -lwc.worldguard.blacklisted=%dark_red%LWC protections are not allowed in this region! +lwc.worldguard.needbuildrights=%dark_red%您需要在此区域的建造权限才能使用LWC进行保护。 +lwc.worldguard.notallowed=%dark_red%LWC不允许在WorldGuard区域之外创建保护! +lwc.worldguard.blacklisted=%dark_red%此区域不允许使用LWC保护! lwc.towny.blocked=%dark_red%你只能在城镇中使用LWC保护方块! -lwc.dropxfer.chestfull=你的箱子已经满了, 多余的物品已返回原处. -lwc.dropxfer.acrossworlds=%dark_red%You cannot drop transfer items across different worlds! +lwc.dropxfer.chestfull=你的箱子已经塞不下啦, 多余的物品已返回原处. +lwc.dropxfer.acrossworlds=%dark_red%你不能在不同的世界里转移物品! lwc.unlock.noselection=%dark_red%请先打开一个受密码保护的容器. @@ -473,9 +473,9 @@ lwc.info=\n\ 保护类型:%dark_green% %type% \n\ %dark_green% # bogus colour to guarantee a new line -lwc.acl=%dark_red%Access Control List%white% (%size%) -lwc.acl.empty=None! Use /cmodify to add players or groups to the access list for your protection. -lwc.acl.limitreached=To view the rest of the access control list, use%yellow% /lwc owners +lwc.acl=%dark_red%访问控制列表%white% (%size%) +lwc.acl.empty=没有创建任何任务!使用/cmodify将玩家或组添加到访问列表中以保护您。 +lwc.acl.limitreached=查看其余的访问控制列表,请使用%yellow% /lwc owners lwc.history.list=\n\ To view extended details on a history item, use%yellow% /lwc details \n\ @@ -484,7 +484,7 @@ To view extended details on a history item, use%yellow% /lwc details %yellow% Showing %size% results on page: %page%/%totalpages% (%totalhistory% total) # Note: these are mainly in sequential order while using /lwc details -lwc.history.details.header=%dark_red%History ID: %id% \n\ +lwc.history.details.header=%dark_red%历史ID: %id% \n\ 建立者:%yellow% %player% \n\ 位置:%yellow% %location% \n\ 状态:%yellow% %status% \n\ @@ -493,7 +493,7 @@ lwc.history.details.header=%dark_red%History ID: %id% \n\ 保护类型:%yellow% %protection% \n\ 建立者:%yellow% %creator% lwc.history.details.destroyer=已经被 %yellow% %player% 拆了. -lwc.history.details.econcharge=Economy charge:%dark_red% %charge% %currencyname% \n\ +lwc.history.details.econcharge=这要花费:%dark_red% %charge% %currencyname% \n\ Discounted?: %discount% lwc.history.details.dates=\n\ %dark_red%Dates \n\ @@ -509,10 +509,10 @@ lwc.debug.standard=%dark_green%普通权限: lwc.debug.mod=%yellow%Mod permissions: lwc.debug.admin=%dark_red%管理员权限: -lwc.flags.available=所有可用的 flags: %flags% +lwc.flags.available=所有可用的 标志: %flags% lwc.devmode.warning=你正在尝试 %dark_red%启用开发者模式 %white% 于 %dark_red% %player% \n\ -%white%开发者模式将会给TA们%dark_red% LWC的所有控制权 %white% 除非你使用 %yellow% /lwc dev disable %player%. \n\ +%white%开发者模式将会给TA们%dark_red% LWC的'所有'控制权 %white% 除非你使用 %yellow% /lwc dev disable %player%. \n\ 请输入 \n\ %yellow%/lwc confirm 确认 lwc.devmode.success=%dark_green%成功打开了 %player% 的开发者模式 @@ -530,7 +530,7 @@ lwc.fix.clickblock=%dark_green%单击一个方块开始使用修复魔咒. lwc.admin.caches.cleared=%dark_green%缓存已清理. lwc.admin.dump.fileexists=%dark_red%文件 %file% 已存在. 请删除它或者移至其他地方! lwc.admin.dump.filenotfound=%dark_red%在查找插件内部的语言文件时发生了错误. -lwc.admin.dump.success=%dark_green%Dumped locale file to: %file% +lwc.admin.dump.success=%dark_green%将区域设置文件转储为: %file% # Donation protection type donation=捐赠 @@ -541,14 +541,14 @@ protection.typechanged=%dark_green%保护类型已修改为 %type% ## 2.1.x ## ########### -lwc.factions.blocked=%dark_red%You are not allowed to protect blocks using LWC inside of this faction! +lwc.factions.blocked=%dark_red%你不允许在这个权限组内使用LWC来保护方块! -protection.modes.nolock.finalize=%dark_green%Registration of new protections is now disabled -protection.modes.nolock.off=%dark_green%Registration of new protections is now enabled +protection.modes.nolock.finalize=%dark_green%现在禁止新保护的上锁 +protection.modes.nolock.off=%dark_green%现在禁止新保护的上锁 ########### ## 2.2.x ## ########### display=Display -prefix=%reset% \ No newline at end of file +prefix=%reset% diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0596523..f99ccf2 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: LWC main: com.griefcraft.lwc.LWCPlugin version: ${version} -api-version: '1.18' +api-version: "1.20.6" author: Hidendra authors: [pop4959, Me_Goes_RAWR] website: https://www.spigotmc.org/resources/lwc-extended.69551/