From 65df63bdfb132ddfe6f98ea614d8df77eeb73041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Bertrand?= Date: Wed, 16 Jun 2021 12:40:32 +0200 Subject: [PATCH 1/2] Converted to Maven project, now supporting 1.17 version and merged all PR --- .gitignore | 23 ---- LockettePro/.classpath | 11 -- LockettePro/.gitignore | 51 ++++++++- LockettePro/.project | 17 --- .../.settings/org.eclipse.jdt.core.prefs | 11 -- LockettePro/pom.xml | 105 ++++++++++++++++++ .../mc/lockettepro/BlockDebugListener.java | 0 .../lockettepro/BlockEnvironmentListener.java | 0 .../BlockInventoryMoveListener.java | 0 .../mc/lockettepro/BlockPlayerListener.java | 2 + .../me/crafter/mc/lockettepro/Config.java | 15 ++- .../me/crafter/mc/lockettepro/Dependency.java | 0 .../mc/lockettepro/DependencyProtocolLib.java | 0 .../mc/lockettepro/DoorToggleTask.java | 0 .../crafter/mc/lockettepro/LockettePro.java | 5 +- .../mc/lockettepro/LocketteProAPI.java | 0 .../me/crafter/mc/lockettepro/Utils.java | 0 .../src/{ => main/resources}/config.yml | 0 LockettePro/src/{ => main/resources}/lang.yml | 0 .../src/{ => main/resources}/lang_de.yml | 0 .../src/{ => main/resources}/lang_es.yml | 28 ++--- .../src/{ => main/resources}/lang_fr.yml | 6 +- .../src/{ => main/resources}/lang_hu.yml | 0 .../src/{ => main/resources}/lang_it.yml | 0 LockettePro/src/main/resources/lang_ko.yml | 31 ++++++ .../src/{ => main/resources}/lang_pl.yml | 0 .../src/{ => main/resources}/lang_zh-cn.yml | 0 LockettePro/src/main/resources/lang_zh-tw.yml | 32 ++++++ LockettePro/src/main/resources/plugin.yml | 25 +++++ LockettePro/src/plugin.yml | 25 ----- 30 files changed, 279 insertions(+), 108 deletions(-) delete mode 100644 .gitignore delete mode 100644 LockettePro/.classpath delete mode 100644 LockettePro/.project delete mode 100644 LockettePro/.settings/org.eclipse.jdt.core.prefs create mode 100644 LockettePro/pom.xml rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/BlockDebugListener.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/BlockEnvironmentListener.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/BlockPlayerListener.java (99%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/Config.java (97%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/Dependency.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/DependencyProtocolLib.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/DoorToggleTask.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/LockettePro.java (97%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/LocketteProAPI.java (100%) rename LockettePro/src/{ => main/java}/me/crafter/mc/lockettepro/Utils.java (100%) rename LockettePro/src/{ => main/resources}/config.yml (100%) rename LockettePro/src/{ => main/resources}/lang.yml (100%) rename LockettePro/src/{ => main/resources}/lang_de.yml (100%) rename LockettePro/src/{ => main/resources}/lang_es.yml (56%) rename LockettePro/src/{ => main/resources}/lang_fr.yml (93%) rename LockettePro/src/{ => main/resources}/lang_hu.yml (100%) rename LockettePro/src/{ => main/resources}/lang_it.yml (100%) create mode 100644 LockettePro/src/main/resources/lang_ko.yml rename LockettePro/src/{ => main/resources}/lang_pl.yml (100%) rename LockettePro/src/{ => main/resources}/lang_zh-cn.yml (100%) create mode 100644 LockettePro/src/main/resources/lang_zh-tw.yml create mode 100644 LockettePro/src/main/resources/plugin.yml delete mode 100644 LockettePro/src/plugin.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a1c2a23..0000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* diff --git a/LockettePro/.classpath b/LockettePro/.classpath deleted file mode 100644 index 66e9dda..0000000 --- a/LockettePro/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/LockettePro/.gitignore b/LockettePro/.gitignore index ae3c172..df73541 100644 --- a/LockettePro/.gitignore +++ b/LockettePro/.gitignore @@ -1 +1,50 @@ -/bin/ +# +# Default excludes +# + +# Binaries +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.war +*.ear +*.sar +*.class + +# Maven +target/ + +# IntelliJ project files +*.iml +*.iws +*.ipr +.idea/ + +# eclipse project file +.settings/ +.classpath +.project + +# NetBeans specific +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + + +# OS +.DS_Store + +# Misc +*.swp +release.properties +pom.xml.releaseBackup +pom.xml.tag \ No newline at end of file diff --git a/LockettePro/.project b/LockettePro/.project deleted file mode 100644 index c209ca5..0000000 --- a/LockettePro/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LockettePro - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/LockettePro/.settings/org.eclipse.jdt.core.prefs b/LockettePro/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index bb35fa0..0000000 --- a/LockettePro/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/LockettePro/pom.xml b/LockettePro/pom.xml new file mode 100644 index 0000000..21235b9 --- /dev/null +++ b/LockettePro/pom.xml @@ -0,0 +1,105 @@ + + + 4.0.0 + + me.crafter.mc + LockettePro + 2.11.0 + + + UTF-8 + 1.8 + 1.8 + + + + + jitpack.io + https://jitpack.io + + + sk89q-repo + https://maven.enginehub.org/repo/ + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + dmulloy2-repo + https://repo.dmulloy2.net/repository/public/ + + + coreprotect-repo + http://maven.playpro.com/ + + + + + + org.spigotmc + spigot-api + 1.17-R0.1-SNAPSHOT + provided + + + com.comphenix.protocol + ProtocolLib + 4.6.0 + provided + + + com.sk89q.worldguard + worldguard-bukkit + 7.0.5 + provided + + + net.coreprotect + coreprotect + 19.5 + provided + + + com.github.MilkBowl + VaultAPI + 1.7 + provided + + + + + ${project.artifactId} + + + src/main/resources + true + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + artifactId-lowercase + + regex-property + + + project.artifactId.lowercase + .* + ${project.artifactId} + $0 + true + false + + + + + + + \ No newline at end of file diff --git a/LockettePro/src/me/crafter/mc/lockettepro/BlockDebugListener.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockDebugListener.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/BlockDebugListener.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockDebugListener.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/BlockEnvironmentListener.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockEnvironmentListener.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/BlockEnvironmentListener.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockEnvironmentListener.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/BlockPlayerListener.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockPlayerListener.java similarity index 99% rename from LockettePro/src/me/crafter/mc/lockettepro/BlockPlayerListener.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockPlayerListener.java index 8d56b84..995640a 100644 --- a/LockettePro/src/me/crafter/mc/lockettepro/BlockPlayerListener.java +++ b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockPlayerListener.java @@ -21,6 +21,7 @@ import org.bukkit.inventory.EquipmentSlot; import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.scheduler.BukkitRunnable; +import java.util.Objects; import java.util.ArrayList; import java.util.List; @@ -247,6 +248,7 @@ public void onAttemptBreakLockedBlocks(BlockBreakEvent event){ @EventHandler(priority = EventPriority.HIGH) public void onAttemptInteractLockedBlocks(PlayerInteractEvent event) { if (event.hasBlock() == false) return; + if (Objects.equals(event.getHand(), EquipmentSlot.OFF_HAND)) return; Action action = event.getAction(); Block block = event.getClickedBlock(); if (LockettePro.needCheckHand() && LocketteProAPI.isChest(block)){ diff --git a/LockettePro/src/me/crafter/mc/lockettepro/Config.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/Config.java similarity index 97% rename from LockettePro/src/me/crafter/mc/lockettepro/Config.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/Config.java index 87a05e1..7682abd 100644 --- a/LockettePro/src/me/crafter/mc/lockettepro/Config.java +++ b/LockettePro/src/main/java/me/crafter/mc/lockettepro/Config.java @@ -195,8 +195,19 @@ public static void initDefaultConfig(){ } public static void initAdditionalFiles(){ - String[] availablefiles = {"lang.yml", "lang_zh-cn.yml", "lang_es.yml", "lang_it.yml", "lang_de.yml", - "lang_hu.yml", "lang_pl.yml", "lang_fr.yml"}; + String[] availablefiles = { + "lang.yml", + "lang_de.yml", + "lang_es.yml", + "lang_fr.yml", + "lang_hu.yml", + "lang_it.yml", + "lang_ko.yml", + "lang_pl.yml", + "lang_zh-cn.yml", + "lang_zh-tw.yml", + }; + for (String filename : availablefiles){ File langfile = new File(plugin.getDataFolder(), filename); if (!langfile.exists()){ diff --git a/LockettePro/src/me/crafter/mc/lockettepro/Dependency.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/Dependency.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/Dependency.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/Dependency.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/DependencyProtocolLib.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/DependencyProtocolLib.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/DependencyProtocolLib.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/DependencyProtocolLib.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/DoorToggleTask.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/DoorToggleTask.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/DoorToggleTask.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/DoorToggleTask.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/LockettePro.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/LockettePro.java similarity index 97% rename from LockettePro/src/me/crafter/mc/lockettepro/LockettePro.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/LockettePro.java index 2b3f81c..ec747f6 100644 --- a/LockettePro/src/me/crafter/mc/lockettepro/LockettePro.java +++ b/LockettePro/src/main/java/me/crafter/mc/lockettepro/LockettePro.java @@ -64,7 +64,10 @@ public void onDisable(){ private void checkMcVersion() { String[] serverVersion = Bukkit.getBukkitVersion().split("-"); String version = serverVersion[0]; - if (version.matches("1.16") || version.matches("1.16.1") || version.matches("1.16.2") || version.matches("1.16.3") || version.matches("1.16.4") || version.matches("1.16.5")) { + if (version.matches("1.17")) { + plugin.getLogger().info("Compatible server version detected: " + version); + is16version = true; + } else if (version.matches("1.16") || version.matches("1.16.1") || version.matches("1.16.2") || version.matches("1.16.3") || version.matches("1.16.4") || version.matches("1.16.5")) { plugin.getLogger().info("Compatible server version detected: " + version); is16version = true; } else if (version.matches("1.15") || version.matches("1.15.1") || version.matches("1.15.2")) { diff --git a/LockettePro/src/me/crafter/mc/lockettepro/LocketteProAPI.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/LocketteProAPI.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/LocketteProAPI.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/LocketteProAPI.java diff --git a/LockettePro/src/me/crafter/mc/lockettepro/Utils.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/Utils.java similarity index 100% rename from LockettePro/src/me/crafter/mc/lockettepro/Utils.java rename to LockettePro/src/main/java/me/crafter/mc/lockettepro/Utils.java diff --git a/LockettePro/src/config.yml b/LockettePro/src/main/resources/config.yml similarity index 100% rename from LockettePro/src/config.yml rename to LockettePro/src/main/resources/config.yml diff --git a/LockettePro/src/lang.yml b/LockettePro/src/main/resources/lang.yml similarity index 100% rename from LockettePro/src/lang.yml rename to LockettePro/src/main/resources/lang.yml diff --git a/LockettePro/src/lang_de.yml b/LockettePro/src/main/resources/lang_de.yml similarity index 100% rename from LockettePro/src/lang_de.yml rename to LockettePro/src/main/resources/lang_de.yml diff --git a/LockettePro/src/lang_es.yml b/LockettePro/src/main/resources/lang_es.yml similarity index 56% rename from LockettePro/src/lang_es.yml rename to LockettePro/src/main/resources/lang_es.yml index f061655..2f5c813 100644 --- a/LockettePro/src/lang_es.yml +++ b/LockettePro/src/main/resources/lang_es.yml @@ -1,32 +1,32 @@ -# Spanish translation by Alarar -command-usage: "&6[Private] &bPrivate plugin ayuda\n&c1. Para a?adir un usuario al private, click derecho en el cartel, y escribe /lock para cambiar o a?adir l��nea.\n&c2. Para recargar la config, utiliza /lock reload.\nLockettepro by connection_lost" +# Spanish translation by Alarar and Teen_Biscuits +command-usage: "&6[Private] &bPrivate plugin ayuda\n&c1. Para agregar un usuario al private, click derecho en el cartel, y escribe /lock para cambiar o agregar fila.\n&c2. Para recargar la config, utiliza /lock reload.\nLockettepro by connection_lost" you-can-quick-lock-it: '&6[Private] &aClick derecho con el cartel en lo que quieras proteger.' you-can-manual-lock-it: '&6[Private] &aPon un cartel y escribe [Private] para privatizarlo.' config-reloaded: '&6[Private] &aConfig recargada.' no-permission: '&6[Private] &cNo tienes permisos para hacer esto.' no-sign-selected: '&6[Private] &cPrimero selecciona un cartel con click derecho.' sign-need-reselect: '&6[Private] &cPor favor selecciona otra vez el cartel.' -line-is-too-long: '&6[Private] &c?Esta l��nea es muy larga!' -cannot-change-this-line: '&6[Private] &cT�� no puedes cambiar esta l��nea.' +line-is-too-long: '&6[Private] &c?Esta fila es muy larga!' +cannot-change-this-line: '&6[Private] &cNo puedes cambiar esta linea.' sign-changed: '&6[Private] &aCartel editado correctamente.' locked-quick: '&6[Private] &aObjeto privatizado correctamente.' additional-sign-added-quick: '&6[Private] &aCartel adicional agregado correctamente.' cannot-lock-quick: '&6[Private] &cNo puedes privatizar eso.' -cannot-add-additional-sign-quick: '&6[Private] &cNo puedes colocar un cartel aqu��.' +cannot-add-additional-sign-quick: '&6[Private] &cNo puedes colocar un cartel en este lugar.' locked-manual: '&6[Private] &aPrivatizado correctamente.' -additional-sign-added-manual: '&6[Private] &aCartel adicional a?adido correctamente.' +additional-sign-added-manual: '&6[Private] &aCartel adicional agregado correctamente.' cannot-lock-manual: '&6[Private] &cNo puedes proteger esto.' -cannot-add-additional-sign-manual: '&6[Private] &cNo puedes a?adir un cartel aqu��.' -not-locked-yet-manual: '&6[Private] &cEste objeto no esta protegido todav��a.' +cannot-add-additional-sign-manual: '&6[Private] &cNo puedes agreagar un cartel en este lugar.' +not-locked-yet-manual: '&6[Private] &cEste objeto no esta protegido por ahora.' cannot-lock-door-nearby-manual: '&6[Private] &cHay una puerta cerca.' block-already-locked-manual: '&6[Private] &cEste bloque esta ya privatizado.' block-is-not-lockable: '&6[Private] &cEste bloque no se puede privatizar.' sign-selected: '&6[Private] &aCartel seleccionado.' -break-own-lock-sign: '&6[Private] &a?Has roto t�� cartel private!.' -cannot-break-this-lock-sign: '&6[Private] &c?No puedes romper este cartel private!.' -break-own-additional-sign: '&6[Private] &aHas roto t�� cartel adicional private.' +break-own-lock-sign: '&6[Private] &aHas roto tu cartel private!.' +cannot-break-this-lock-sign: '&6[Private] &cNo puedes romper este cartel private!.' +break-own-additional-sign: '&6[Private] &aHas roto tu cartel adicional private.' break-redundant-additional-sign: '&6[Private] &aHas roto un cartel private que era redundante.' cannot-break-this-additional-sign: '&6[Private] &cNo puedes romper este cartel adicional de private!.' -block-is-locked: '&6[Private] &c?Este bloque esta protegido!.' -cannot-interfere-with-others: '&6[Private] &c?No puedes poner un cartel interfiriendo con otros de private!.' -sign-error: '&4[ERROR]' \ No newline at end of file +block-is-locked: '&6[Private] &cEste bloque esta protegido!.' +cannot-interfere-with-others: '&6[Private] &cNo puedes poner un cartel interfiriendo con otros de private!.' +sign-error: '&4[ERROR]' diff --git a/LockettePro/src/lang_fr.yml b/LockettePro/src/main/resources/lang_fr.yml similarity index 93% rename from LockettePro/src/lang_fr.yml rename to LockettePro/src/main/resources/lang_fr.yml index f9fc7d9..5b957f7 100644 --- a/LockettePro/src/lang_fr.yml +++ b/LockettePro/src/main/resources/lang_fr.yml @@ -1,7 +1,7 @@ -# German translation by Morgan_vonBrylan +# French translation by Mrflo67 and brunyman command-usage: "&6[LockettePro] aide du plugin &bLockettePro\n&c1. Pour ajouter un joueur au panneau, faites clic droit dessus, puis entrez /lock pour changer la ligne.\n&c2. Pour recharger la configuration, entrez /lock reload.\nLockettePro par connection_lost" -you-can-quick-lock-it: '&6[LockettePro] &aClick droit sur un bloc avec un panneau pour le verrouiller.' +you-can-quick-lock-it: '&6[LockettePro] &aClic droit sur un bloc avec un panneau pour le verrouiller.' you-can-manual-lock-it: '&6[LockettePro] &aPlacez un panneau et crivez [Private] pour le verrouiller.' config-reloaded: '&6[LockettePro] &aConfiguration recharge.' no-permission: '&6[LockettePro] &cVous n''avez pas la permission de faire a.' @@ -27,7 +27,7 @@ break-own-lock-sign: '&6[LockettePro] &aVous avez cass cannot-break-this-lock-sign: '&6[LockettePro] &cVous ne pouvez pas casser ce panneau verrou.' break-own-additional-sign: '&6[LockettePro] &aVous avez cass votre panneau supplmentaire.' break-redundant-additional-sign: '&6[LockettePro] &aVous avez cass un panneau supplmentaire redondant.' -cannot-break-this-additional-sign: '&6[LockettePro] &cVous ne pouvez pas cesser ce panneau supplmentaire.' +cannot-break-this-additional-sign: '&6[LockettePro] &cVous ne pouvez pas casser ce panneau supplmentaire.' block-is-locked: '&6[LockettePro] &cCe bloc est verrouill.' cannot-interfere-with-others: '&6[LockettePro] &cVous ne pouvez pas placer de bloc qui pourrait interfrer avec d''autres.' sign-error: '&4[ERREUR]' \ No newline at end of file diff --git a/LockettePro/src/lang_hu.yml b/LockettePro/src/main/resources/lang_hu.yml similarity index 100% rename from LockettePro/src/lang_hu.yml rename to LockettePro/src/main/resources/lang_hu.yml diff --git a/LockettePro/src/lang_it.yml b/LockettePro/src/main/resources/lang_it.yml similarity index 100% rename from LockettePro/src/lang_it.yml rename to LockettePro/src/main/resources/lang_it.yml diff --git a/LockettePro/src/main/resources/lang_ko.yml b/LockettePro/src/main/resources/lang_ko.yml new file mode 100644 index 0000000..792a13c --- /dev/null +++ b/LockettePro/src/main/resources/lang_ko.yml @@ -0,0 +1,31 @@ +command-usage: "&6[LockettePro] &bLockettePro 플러그인 도움말\n&c1. 표지판에 유저를 추가하려면, 표지판을 우클릭하고, 명령어 /lock <줄 번호> <텍스트> 를 입력해 줄을 수정할 수 있습니다.\n&c2. 설정을 리로드하려면, 명령어 /lock reload 를 입력하세요.\nLockettePro by connection_lost" +you-can-quick-lock-it: '&6[LockettePro] &a표지판으로 우클릭해 블록을 잠급니다.' +you-can-manual-lock-it: '&6[LockettePro] &a표지판을 설치해 [Private] 를 적어 잠급니다.' +config-reloaded: '&6[LockettePro] &a설정 리로드됨.' +no-permission: '&6[LockettePro] &c권한이 없습니다.' +no-sign-selected: '&6[LockettePro] &c먼저 표지판을 우클릭해 선택해야 합니다.' +sign-need-reselect: '&6[LockettePro] &c표지판을 다시 선택해주세요.' +line-is-too-long: '&6[LockettePro] &c줄이 너무 깁니다!' +cannot-change-this-line: '&6[LockettePro] &c이 줄은 수정할 수 없습니다.' +sign-changed: '&6[LockettePro] &a표지판이 수정되었습니다.' +locked-quick: '&6[LockettePro] &a블록이 성공적으로 잠겼습니다.' +additional-sign-added-quick: '&6[LockettePro] &a표지판이 성공적으로 추가되었습니다.' +cannot-lock-quick: '&6[LockettePro] &c잠글 수 없습니다.' +cannot-add-additional-sign-quick: '&6[LockettePro] &c이곳엔 표지판을 추가할 수 없습니다.' +locked-manual: '&6[LockettePro] &a블록이 성공적으로 잠겼습니다.' +additional-sign-added-manual: '&6[LockettePro] &a표지판이 성공적으로 추가되었습니다.' +cannot-lock-manual: '&6[LockettePro] &c잠글 수 없습니다.' +cannot-add-additional-sign-manual: '&6[LockettePro] &c이곳엔 표지판을 추가할 수 없습니다.' +not-locked-yet-manual: '&6[LockettePro] &c이 블록은 아직 잠겨있지 않습니다.' +cannot-lock-door-nearby-manual: '&6[LockettePro] &c근처에 문이 있습니다.' +block-already-locked-manual: '&6[LockettePro] &c이 블록은 이미 잠겨있습니다.' +block-is-not-lockable: '&6[LockettePro] &c잠글 수 있는 블록이 아닙니다.' +sign-selected: '&6[LockettePro] &a표지판이 선택되었습니다. &c/lock' +break-own-lock-sign: '&6[LockettePro] &a잠금 표지판을 부쉈습니다.' +cannot-break-this-lock-sign: '&6[LockettePro] &c이 잠금 표지판은 부술 수 없습니다.' +break-own-additional-sign: '&6[LockettePro] &a잠금 표지판을 부쉈습니다.' +break-redundant-additional-sign: '&6[LockettePro] &a중복된 잠금 표지판을 부쉈습니다.' +cannot-break-this-additional-sign: '&6[LockettePro] &c이 잠금 표지판은 부술 수 없습니다.' +block-is-locked: '&6[LockettePro] &c이 블록은 잠겨있습니다.' +cannot-interfere-with-others: '&6[LockettePro] &c다른 것들에 간섭할 수 있는 블록은 설치할 수 없습니다.' +sign-error: '&4[오류]' \ No newline at end of file diff --git a/LockettePro/src/lang_pl.yml b/LockettePro/src/main/resources/lang_pl.yml similarity index 100% rename from LockettePro/src/lang_pl.yml rename to LockettePro/src/main/resources/lang_pl.yml diff --git a/LockettePro/src/lang_zh-cn.yml b/LockettePro/src/main/resources/lang_zh-cn.yml similarity index 100% rename from LockettePro/src/lang_zh-cn.yml rename to LockettePro/src/main/resources/lang_zh-cn.yml diff --git a/LockettePro/src/main/resources/lang_zh-tw.yml b/LockettePro/src/main/resources/lang_zh-tw.yml new file mode 100644 index 0000000..48df732 --- /dev/null +++ b/LockettePro/src/main/resources/lang_zh-tw.yml @@ -0,0 +1,32 @@ +# Chinese (traditional) translation by 旋風之音 GoneTone and Minecraft 麥塊資訊工具網 +you-can-quick-lock-it: '&6[LockettePro] &a手持告示牌,對方塊按下右鍵後即可上鎖。' +you-can-manual-lock-it: '&6[LockettePro] &a放置告示牌並寫上 [Private] 即可上鎖。' +config-reloaded: '&6[LockettePro] &a已重新載入配置。' +no-permission: '&6[LockettePro] &c你無權執行此動作。' +no-sign-selected: '&6[LockettePro] &c請先按下右鍵選取告示牌。' +sign-need-reselect: '&6[LockettePro] &c請重新選擇告示牌。' +line-is-too-long: '&6[LockettePro] &c這一行的內容太長!' +cannot-change-this-line: '&6[LockettePro] &c你不可以變更這一行的內容。' +sign-changed: '&6[LockettePro] &a已成功編輯告示牌。' +locked-quick: '&6[LockettePro] &a已經成功上鎖方塊。' +additional-sign-added-quick: '&6[LockettePro] &a已成功新增額外告示牌。' +cannot-lock-quick: '&6[LockettePro] &c不能鎖定這個方塊。' +locked-manual: '&6[LockettePro] &a已成功上鎖方塊。' +additional-sign-added-manual: '&6[LockettePro] &a已成功新增額外告示牌。' +cannot-lock-manual: '&6[LockettePro] &c不能鎖定這個方塊。' +not-locked-yet-manual: '&6[LockettePro] &c尚未上鎖此方塊。' +cannot-lock-door-nearby-manual: '&6[LockettePro] &c附近有門。' +block-already-locked-manual: '&6[LockettePro] &c這個方塊已上鎖。' +block-is-not-lockable: '&6[LockettePro] &c這個方塊不能上鎖。' +sign-selected: '&6[LockettePro] &a已選取告示牌。' +sign-error: '&4[錯誤]' +command-usage: "&6[LockettePro] &bLockettePro 插件說明\n&c1. 如要將使用者加入告示牌中,請先按右鍵選取告示牌,然後輸入 \"/lock <行碼> <文字>\" 即可變更行的內容。\n&c2. 如要重新載入配置,請輸入 /lock reload。\nLockettePro 作者:connection_lost" +cannot-add-additional-sign-quick: '&6[LockettePro] &c不能在這裡新增告示牌' +break-own-lock-sign: '&6[LockettePro] &a你把告示牌鎖拆了。' +cannot-break-this-lock-sign: '&6[LockettePro] &c你不可以拆掉這個告示牌鎖。' +break-own-additional-sign: '&6[LockettePro] &a你把額外告示牌拆了。' +break-redundant-additional-sign: '&6[LockettePro] &a你把廢棄的額外告示牌拆了。' +cannot-break-this-additional-sign: '&6[LockettePro] &c你不可以拆掉這個額外告示牌。' +block-is-locked: '&6[LockettePro] &c這個方塊已經上鎖。' +cannot-interfere-with-others: '&6[LockettePro] &c你不能放置會干擾其他方塊的方塊。' +cannot-add-additional-sign-manual: '&6[LockettePro] &c不能在這裡新增告示牌' \ No newline at end of file diff --git a/LockettePro/src/main/resources/plugin.yml b/LockettePro/src/main/resources/plugin.yml new file mode 100644 index 0000000..c42eaac --- /dev/null +++ b/LockettePro/src/main/resources/plugin.yml @@ -0,0 +1,25 @@ +name: ${project.artifactId} +main: ${project.groupId}.${project.artifactId.lowercase}.${project.artifactId} +author: connection_lost +softdepend: [Vault, WorldGuard, ProtocolLib, CoreProtect] +loadbefore: [SignShop] +version: ${project.version} +api-version: 1.13 +description: > + LockettePro is a chest protection plugin for Bukkit. It is 100% compatible with original Lockette, but delivers a lot of performance enhancements and feature options. +commands: + lockettepro: + permission: lockettepro.command + usage: | + /lock + aliases: [lock, lockette, lockit] +permissions: + lockettepro.command: + description: Command permission for LockettePro + default: true + lockettepro.lock: + description: Basic lock permission + default: true + lockettepro.edit: + description: Edit sign permission + default: true \ No newline at end of file diff --git a/LockettePro/src/plugin.yml b/LockettePro/src/plugin.yml deleted file mode 100644 index 5eac849..0000000 --- a/LockettePro/src/plugin.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: LockettePro -main: me.crafter.mc.lockettepro.LockettePro -author: connection_lost -softdepend: [Vault, WorldGuard, ProtocolLib, CoreProtect] -loadbefore: [SignShop] -version: 2.10.10 -api-version: 1.13 -description: > - LockettePro is a chest protection plugin for Bukkit. It is 100% compatible with original Lockette, but delivers a lot of performance enhancements and feature options. -commands: - lockettepro: - permission: lockettepro.command - usage: | - /lock - aliases: [lock, lockette, lockit] -permissions: - lockettepro.command: - description: Command permission for LockettePro - default: true - lockettepro.lock: - description: Basic lock permission - default: true - lockettepro.edit: - description: Edit sign permission - default: true \ No newline at end of file From 00fa9e4a2e1b98a448171b87f1a53c1a4d2cbfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Bertrand?= Date: Wed, 16 Jun 2021 12:51:01 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Changed=20matches=20to=20=C2=96equalsIgnore?= =?UTF-8?q?Case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../me/crafter/mc/lockettepro/BlockInventoryMoveListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java index 3a2f183..01e0f95 100644 --- a/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java +++ b/LockettePro/src/main/java/me/crafter/mc/lockettepro/BlockInventoryMoveListener.java @@ -42,7 +42,7 @@ public void onInventoryMove(InventoryMoveItemEvent event){ String sourceOwner = LocketteProAPI.getOwner(sourceInventoryBlock); String destOwner = LocketteProAPI.getOwner(destinationInventoryBlock); if (destOwner != null && sourceOwner != null) { - if (sourceOwner.matches(destOwner)) { + if (sourceOwner.equalsIgnoreCase(destOwner)) { event.setCancelled(false); } }