generated from 4drian3d/VelocityPluginTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/fabric
# Conflicts: # gradle.properties # settings.gradle.kts
- Loading branch information
Showing
27 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
backend/common/src/main/java/io/github/_4drian3d/signedvelocity/common/PropertyHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.github._4drian3d.signedvelocity.common; | ||
|
||
public final class PropertyHolder { | ||
private PropertyHolder() { | ||
throw new AssertionError(); | ||
} | ||
|
||
public static boolean readBoolean(final String property, final boolean defaultValue) { | ||
final String value = System.getProperty(property); | ||
if (value == null) { | ||
return defaultValue; | ||
} else { | ||
try { | ||
return "true".equalsIgnoreCase(value); | ||
} catch (final Exception ignored) { | ||
return defaultValue; | ||
} | ||
|
||
} | ||
} | ||
|
||
public static String readValue(final String property, final String defaultValue) { | ||
return System.getProperty(property, defaultValue); | ||
} | ||
|
||
public static int readInt(final String property, final int defaultValue) { | ||
final String value = System.getProperty(property); | ||
if (value == null) { | ||
return defaultValue; | ||
} else { | ||
try { | ||
return Integer.parseInt(value); | ||
} catch (final Exception ignored) { | ||
return defaultValue; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...3d/signedvelocity/common/SignedQueue.java → ...nedvelocity/common/queue/SignedQueue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...d/signedvelocity/common/SignedResult.java → ...edvelocity/common/queue/SignedResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nd/minestom/src/main/java/io/github/_4drian3d/signedvelocity/minestom/SignedVelocity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/main/java/io/github/_4drian3d/signedvelocity/minestom/listener/PlayerChatListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...main/java/io/github/_4drian3d/signedvelocity/minestom/listener/PlayerCommandListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...main/java/io/github/_4drian3d/signedvelocity/minestom/listener/PluginMessageListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
...c/main/java/io/github/_4drian3d/signedvelocity/paper/listener/LocalExecutionDetector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
package io.github._4drian3d.signedvelocity.paper.listener; | ||
|
||
import io.github._4drian3d.signedvelocity.common.PropertyHolder; | ||
|
||
public interface LocalExecutionDetector { | ||
boolean CHECK_FOR_LOCAL_CHAT = check(); | ||
private static boolean check() { | ||
final String property = System.getProperty("io.github._4drian3d.signedvelocity.checkForLocalChat"); | ||
if (property == null) { | ||
return true; | ||
} else { | ||
return Boolean.parseBoolean(property); | ||
} | ||
} | ||
boolean CHECK_FOR_LOCAL_CHAT = PropertyHolder.readBoolean("io.github._4drian3d.signedvelocity.checkForLocalChat", true); | ||
|
||
boolean isLocal(); | ||
} |
2 changes: 1 addition & 1 deletion
2
...r/src/main/java/io/github/_4drian3d/signedvelocity/paper/listener/PlayerChatListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/main/java/io/github/_4drian3d/signedvelocity/paper/listener/PlayerCommandListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r/src/main/java/io/github/_4drian3d/signedvelocity/paper/listener/PlayerQuitListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
group = io.github._4drian3d | ||
version = 1.0.4-SNAPSHOT | ||
version = 1.1.1-SNAPSHOT | ||
description = Allows you to cancel or modify messages or commands from Velocity without synchronization problems | ||
org.gradle.jvmargs=-Xmx2G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters