Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to 1.17, converted to Maven projet, Merged other PR #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions LockettePro/.classpath

This file was deleted.

51 changes: 50 additions & 1 deletion LockettePro/.gitignore
Original file line number Diff line number Diff line change
@@ -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
17 changes: 0 additions & 17 deletions LockettePro/.project

This file was deleted.

11 changes: 0 additions & 11 deletions LockettePro/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

105 changes: 105 additions & 0 deletions LockettePro/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>me.crafter.mc</groupId>
<artifactId>LockettePro</artifactId>
<version>2.11.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/repository/public/</url>
</repository>
<repository>
<id>coreprotect-repo</id>
<url>http://maven.playpro.com/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.coreprotect</groupId>
<artifactId>coreprotect</artifactId>
<version>19.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>artifactId-lowercase</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>project.artifactId.lowercase</name>
<regex>.*</regex>
<value>${project.artifactId}</value>
<replacement>$0</replacement>
<toLowerCase>true</toLowerCase>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 <numero l��nea> <nombre> 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 <numero fila> <nombre> 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]'
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]'
Original file line number Diff line number Diff line change
@@ -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 <ligne> <texte> 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 recharg�e.'
no-permission: '&6[LockettePro] &cVous n''avez pas la permission de faire �a.'
Expand All @@ -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 suppl�mentaire.'
break-redundant-additional-sign: '&6[LockettePro] &aVous avez cass� un panneau suppl�mentaire redondant.'
cannot-break-this-additional-sign: '&6[LockettePro] &cVous ne pouvez pas cesser ce panneau suppl�mentaire.'
cannot-break-this-additional-sign: '&6[LockettePro] &cVous ne pouvez pas casser ce panneau suppl�mentaire.'
block-is-locked: '&6[LockettePro] &cCe bloc est verrouill�.'
cannot-interfere-with-others: '&6[LockettePro] &cVous ne pouvez pas placer de bloc qui pourrait interf�rer avec d''autres.'
sign-error: '&4[ERREUR]'
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions LockettePro/src/main/resources/lang_ko.yml
Original file line number Diff line number Diff line change
@@ -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[오류]'
File renamed without changes.
Loading