Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit 2efa5e4

Browse files
author
BuildTools
committedDec 30, 2021
Gradle + bStats + Update Checker
1 parent c5e4473 commit 2efa5e4

20 files changed

+1333
-27
lines changed
 

‎.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

‎.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
/.idea/
66
/.project/
77
/.classpath
8-
.gitignore
98
/.project
109
/.git/
10+
11+
# Ignore Gradle project-specific cache directory
12+
.gradle
13+
14+
# Ignore Gradle build output directory
15+
build

‎build.gradle

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugins {
2+
id 'java'
3+
}
4+
5+
group 'ru.enis'
6+
version '1.5'
7+
compileJava.options.encoding = 'UTF-8'
8+
9+
10+
repositories {
11+
mavenCentral()
12+
maven {
13+
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
14+
15+
content {
16+
includeGroup 'org.bukkit'
17+
includeGroup 'org.spigotmc'
18+
}
19+
}
20+
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
21+
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
22+
maven {
23+
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
24+
}
25+
maven { url 'https://jitpack.io' }
26+
}
27+
28+
dependencies {
29+
// Pick only one of these and read the comment in the repositories block.
30+
compileOnly 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT' // The Spigot API with no shadowing. Requires the OSS repo.
31+
compileOnly 'me.clip:placeholderapi:2.11.0'
32+
compileOnly 'org.jetbrains:annotations:22.0.0'
33+
}

‎eHideTags.iml

-12
This file was deleted.

‎gradle/wrapper/gradle-wrapper.jar

58.1 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

‎gradlew

+234
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
#!/bin/sh
2+
3+
#
4+
# Copyright © 2015-2021 the original authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
##############################################################################
20+
#
21+
# Gradle start up script for POSIX generated by Gradle.
22+
#
23+
# Important for running:
24+
#
25+
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26+
# noncompliant, but you have some other compliant shell such as ksh or
27+
# bash, then to run this script, type that shell name before the whole
28+
# command line, like:
29+
#
30+
# ksh Gradle
31+
#
32+
# Busybox and similar reduced shells will NOT work, because this script
33+
# requires all of these POSIX shell features:
34+
# * functions;
35+
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36+
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37+
# * compound commands having a testable exit status, especially «case»;
38+
# * various built-in commands including «command», «set», and «ulimit».
39+
#
40+
# Important for patching:
41+
#
42+
# (2) This script targets any POSIX shell, so it avoids extensions provided
43+
# by Bash, Ksh, etc; in particular arrays are avoided.
44+
#
45+
# The "traditional" practice of packing multiple parameters into a
46+
# space-separated string is a well documented source of bugs and security
47+
# problems, so this is (mostly) avoided, by progressively accumulating
48+
# options in "$@", and eventually passing that to Java.
49+
#
50+
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51+
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52+
# see the in-line comments for details.
53+
#
54+
# There are tweaks for specific operating systems such as AIX, CygWin,
55+
# Darwin, MinGW, and NonStop.
56+
#
57+
# (3) This script is generated from the Groovy template
58+
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59+
# within the Gradle project.
60+
#
61+
# You can find Gradle at https://github.com/gradle/gradle/.
62+
#
63+
##############################################################################
64+
65+
# Attempt to set APP_HOME
66+
67+
# Resolve links: $0 may be a link
68+
app_path=$0
69+
70+
# Need this for daisy-chained symlinks.
71+
while
72+
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73+
[ -h "$app_path" ]
74+
do
75+
ls=$( ls -ld "$app_path" )
76+
link=${ls#*' -> '}
77+
case $link in #(
78+
/*) app_path=$link ;; #(
79+
*) app_path=$APP_HOME$link ;;
80+
esac
81+
done
82+
83+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84+
85+
APP_NAME="Gradle"
86+
APP_BASE_NAME=${0##*/}
87+
88+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90+
91+
# Use the maximum available, or set MAX_FD != -1 to use that value.
92+
MAX_FD=maximum
93+
94+
warn () {
95+
echo "$*"
96+
} >&2
97+
98+
die () {
99+
echo
100+
echo "$*"
101+
echo
102+
exit 1
103+
} >&2
104+
105+
# OS specific support (must be 'true' or 'false').
106+
cygwin=false
107+
msys=false
108+
darwin=false
109+
nonstop=false
110+
case "$( uname )" in #(
111+
CYGWIN* ) cygwin=true ;; #(
112+
Darwin* ) darwin=true ;; #(
113+
MSYS* | MINGW* ) msys=true ;; #(
114+
NONSTOP* ) nonstop=true ;;
115+
esac
116+
117+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118+
119+
120+
# Determine the Java command to use to start the JVM.
121+
if [ -n "$JAVA_HOME" ] ; then
122+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123+
# IBM's JDK on AIX uses strange locations for the executables
124+
JAVACMD=$JAVA_HOME/jre/sh/java
125+
else
126+
JAVACMD=$JAVA_HOME/bin/java
127+
fi
128+
if [ ! -x "$JAVACMD" ] ; then
129+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130+
131+
Please set the JAVA_HOME variable in your environment to match the
132+
location of your Java installation."
133+
fi
134+
else
135+
JAVACMD=java
136+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137+
138+
Please set the JAVA_HOME variable in your environment to match the
139+
location of your Java installation."
140+
fi
141+
142+
# Increase the maximum file descriptors if we can.
143+
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144+
case $MAX_FD in #(
145+
max*)
146+
MAX_FD=$( ulimit -H -n ) ||
147+
warn "Could not query maximum file descriptor limit"
148+
esac
149+
case $MAX_FD in #(
150+
'' | soft) :;; #(
151+
*)
152+
ulimit -n "$MAX_FD" ||
153+
warn "Could not set maximum file descriptor limit to $MAX_FD"
154+
esac
155+
fi
156+
157+
# Collect all arguments for the java command, stacking in reverse order:
158+
# * args from the command line
159+
# * the main class name
160+
# * -classpath
161+
# * -D...appname settings
162+
# * --module-path (only if needed)
163+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164+
165+
# For Cygwin or MSYS, switch paths to Windows format before running java
166+
if "$cygwin" || "$msys" ; then
167+
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168+
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169+
170+
JAVACMD=$( cygpath --unix "$JAVACMD" )
171+
172+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
173+
for arg do
174+
if
175+
case $arg in #(
176+
-*) false ;; # don't mess with options #(
177+
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178+
[ -e "$t" ] ;; #(
179+
*) false ;;
180+
esac
181+
then
182+
arg=$( cygpath --path --ignore --mixed "$arg" )
183+
fi
184+
# Roll the args list around exactly as many times as the number of
185+
# args, so each arg winds up back in the position where it started, but
186+
# possibly modified.
187+
#
188+
# NB: a `for` loop captures its iteration list before it begins, so
189+
# changing the positional parameters here affects neither the number of
190+
# iterations, nor the values presented in `arg`.
191+
shift # remove old arg
192+
set -- "$@" "$arg" # push replacement arg
193+
done
194+
fi
195+
196+
# Collect all arguments for the java command;
197+
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198+
# shell script including quotes and variable substitutions, so put them in
199+
# double quotes to make sure that they get re-expanded; and
200+
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
set -- \
203+
"-Dorg.gradle.appname=$APP_BASE_NAME" \
204+
-classpath "$CLASSPATH" \
205+
org.gradle.wrapper.GradleWrapperMain \
206+
"$@"
207+
208+
# Use "xargs" to parse quoted args.
209+
#
210+
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211+
#
212+
# In Bash we could simply go:
213+
#
214+
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215+
# set -- "${ARGS[@]}" "$@"
216+
#
217+
# but POSIX shell has neither arrays nor command substitution, so instead we
218+
# post-process each arg (as a line of input to sed) to backslash-escape any
219+
# character that might be a shell metacharacter, then use eval to reverse
220+
# that process (while maintaining the separation between arguments), and wrap
221+
# the whole thing up as a single "set" statement.
222+
#
223+
# This will of course break if any of these variables contains a newline or
224+
# an unmatched quote.
225+
#
226+
227+
eval "set -- $(
228+
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229+
xargs -n1 |
230+
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231+
tr '\n' ' '
232+
)" '"$@"'
233+
234+
exec "$JAVACMD" "$@"

‎gradlew.bat

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%" == "" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%" == "" set DIRNAME=.
29+
set APP_BASE_NAME=%~n0
30+
set APP_HOME=%DIRNAME%
31+
32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
35+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37+
38+
@rem Find java.exe
39+
if defined JAVA_HOME goto findJavaFromJavaHome
40+
41+
set JAVA_EXE=java.exe
42+
%JAVA_EXE% -version >NUL 2>&1
43+
if "%ERRORLEVEL%" == "0" goto execute
44+
45+
echo.
46+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47+
echo.
48+
echo Please set the JAVA_HOME variable in your environment to match the
49+
echo location of your Java installation.
50+
51+
goto fail
52+
53+
:findJavaFromJavaHome
54+
set JAVA_HOME=%JAVA_HOME:"=%
55+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56+
57+
if exist "%JAVA_EXE%" goto execute
58+
59+
echo.
60+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61+
echo.
62+
echo Please set the JAVA_HOME variable in your environment to match the
63+
echo location of your Java installation.
64+
65+
goto fail
66+
67+
:execute
68+
@rem Setup the command line
69+
70+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71+
72+
73+
@rem Execute Gradle
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75+
76+
:end
77+
@rem End local scope for the variables with windows NT shell
78+
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
80+
:fail
81+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82+
rem the _cmd.exe /c_ return code!
83+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84+
exit /b 1
85+
86+
:mainEnd
87+
if "%OS%"=="Windows_NT" endlocal
88+
89+
:omega

‎pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>ru.enis</groupId>
88
<artifactId>eHideTags</artifactId>
9-
<version>1.4</version>
9+
<version>1.5</version>
1010
<packaging>jar</packaging>
1111

1212
<name>eHideTags</name>

‎settings.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* The settings file is used to specify which projects to include in your build.
5+
*
6+
* Detailed information about configuring a multi-project build in Gradle can be found
7+
* in the user manual at https://docs.gradle.org/7.2/userguide/multi_project_builds.html
8+
*/
9+
10+
rootProject.name = 'eHideTags'

‎src/main/java/ru/enis/ehidetags/Core.java

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.bukkit.plugin.java.JavaPlugin;
88

99
public final class Core extends JavaPlugin implements Listener {
10+
public static boolean OUTDATED = false;
1011
private static Core instance;
1112
Logger log = this.getLogger();
1213
public static Core getInstance(){

‎src/main/java/ru/enis/ehidetags/MainInit.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,35 @@
33
import org.bukkit.Bukkit;
44
import ru.enis.ehidetags.commands.cmdInit;
55
import ru.enis.ehidetags.events.EventInit;
6-
import ru.enis.ehidetags.misc.configs.Config;
6+
import ru.enis.ehidetags.misc.UpdateChecker;
7+
import ru.enis.ehidetags.misc.bStatsMetrics;
78
import ru.enis.ehidetags.misc.configs.ConfigInit;
9+
import ru.enis.ehidetags.misc.logger.Log;
810
import ru.enis.ehidetags.misc.other;
911

1012
public class MainInit {
1113

1214
public MainInit(Core plugin){
15+
Log.init();
1316
new ConfigInit(plugin);
1417
other.boardSettings();
1518
new EventInit(plugin);
1619
new cmdInit(plugin);
20+
21+
new UpdateChecker(plugin, 97904).getVersion(version -> {
22+
if (!plugin.getDescription().getVersion().equals(version)) {
23+
Log.info("There is a new update available.");
24+
Core.OUTDATED = true;
25+
}
26+
});
27+
1728
if (!Bukkit.getOnlinePlayers().isEmpty()) {
1829
Bukkit.getOnlinePlayers().forEach(other::hideName);
1930
}
2031

32+
int pluginId = 13770;
33+
bStatsMetrics metrics = new bStatsMetrics(plugin, pluginId);
34+
2135
Bukkit.getConsoleSender().sendMessage("");
2236
Bukkit.getConsoleSender().sendMessage("§6eHideTags §f| §aSuccessfully enabled");
2337
Bukkit.getConsoleSender().sendMessage("§6eHideTags §f| §aBy: §fvk.com/rogablik");

‎src/main/java/ru/enis/ehidetags/commands/MainCMD.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import org.jetbrains.annotations.Nullable;
99
import ru.enis.ehidetags.*;
10-
import ru.enis.ehidetags.misc.configs.Config;
1110
import ru.enis.ehidetags.misc.configs.ConfigInit;
1211
import ru.enis.ehidetags.misc.configs.Messages;
1312

@@ -27,9 +26,11 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
2726
if(args.length == 0){
2827
sender.sendMessage("§6eHideTags\n" + "§aAuthor: " + Core.getInstance().getDescription().getAuthors() + "\nVersion: " + plugin.getDescription().getVersion());
2928
return true;
30-
} /*else if (args.length > 1) {
29+
}
30+
if (args.length > 1) {
3131
sender.sendMessage("§6eHideTags §f| " + Messages.Wrong_Usage);
32-
}*/
32+
return true;
33+
}
3334
if(args[0].equalsIgnoreCase("reload") && sender.hasPermission("eht.reload")) {
3435
new ConfigInit(plugin);
3536
sender.sendMessage("§6eHideTags §f| " + Messages.Plugin_Reloaded);
@@ -39,6 +40,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @N
3940
sender.sendMessage("§6eHideTags §f| §a/eht reload - " + Messages.help_Cmd_Reload);
4041
return true;
4142
}
43+
sender.sendMessage("§6eHideTags §f| " + Messages.Wrong_Usage);
4244
return true;
4345
}
4446
}

‎src/main/java/ru/enis/ehidetags/commands/tabcompleter/MainTab.java

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.bukkit.command.Command;
44
import org.bukkit.command.CommandSender;
55
import org.bukkit.command.TabCompleter;
6-
import org.bukkit.util.StringUtil;
76
import org.jetbrains.annotations.NotNull;
87
import org.jetbrains.annotations.Nullable;
98
import ru.enis.ehidetags.Core;
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
package ru.enis.ehidetags.events;
22

3+
import net.md_5.bungee.api.ChatColor;
4+
import net.md_5.bungee.api.chat.BaseComponent;
5+
import net.md_5.bungee.api.chat.ClickEvent;
6+
import net.md_5.bungee.api.chat.ComponentBuilder;
37
import org.bukkit.Bukkit;
48
import org.bukkit.event.player.PlayerJoinEvent;
59
import ru.enis.ehidetags.*;
610
import ru.enis.ehidetags.misc.*;
711
import org.bukkit.event.Listener;
812
import org.bukkit.event.EventHandler;
913

10-
public class onJoin implements Listener{
14+
public class onJoin implements Listener {
1115

12-
public onJoin(Core pluginA){
16+
public onJoin(Core pluginA) {
1317
Bukkit.getPluginManager().registerEvents(this, pluginA);
1418
}
19+
1520
@EventHandler
1621
public void join(PlayerJoinEvent e) {
22+
if (e.getPlayer().hasPermission("eht.updatenotify") && Core.OUTDATED){
23+
e.getPlayer().sendMessage(Color.ColorFormat("§6eHideTags §f| &7An update for plugin is available"));
24+
}
1725
other.hideName(e.getPlayer());
1826
}
19-
}
27+
}
2028

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package ru.enis.ehidetags.misc;
2+
3+
import org.bukkit.Bukkit;
4+
import org.bukkit.plugin.java.JavaPlugin;
5+
import ru.enis.ehidetags.misc.logger.Log;
6+
7+
import java.io.IOException;
8+
import java.io.InputStream;
9+
import java.net.URL;
10+
import java.util.Scanner;
11+
import java.util.function.Consumer;
12+
13+
public class UpdateChecker {
14+
private final JavaPlugin plugin;
15+
private final int resourceId;
16+
17+
public UpdateChecker(JavaPlugin plugin, int resourceId) {
18+
this.plugin = plugin;
19+
this.resourceId = resourceId;
20+
}
21+
22+
public void getVersion(final Consumer<String> consumer) {
23+
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
24+
try (InputStream inputStream = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId).openStream(); Scanner scanner = new Scanner(inputStream)) {
25+
if (scanner.hasNext()) {
26+
consumer.accept(scanner.next());
27+
}
28+
} catch (IOException exception) {
29+
Log.info("Unable to check for updates: " + exception.getMessage());
30+
}
31+
});
32+
}
33+
}

‎src/main/java/ru/enis/ehidetags/misc/bStatsMetrics.java

+848
Large diffs are not rendered by default.

‎src/main/java/ru/enis/ehidetags/misc/configs/Messages.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public Messages(Core pluginA) {
1515
CustomYML messages = new CustomYML("Messages", plugin);
1616
help_Cmd_Reload = Color.ColorFormat(messages.getConfigField("Help.Reload", "&aReloads plugin configuration"));
1717
Plugin_Reloaded = Color.ColorFormat(messages.getConfigField("Reload", "&aSuccessfully reloaded"));
18-
//Wrong_Usage = Color.ColorFormat(messages.getConfigField("Wrong-Usage", "&7Wrong usage! Please type &6/eht help&7!"));
18+
Wrong_Usage = Color.ColorFormat(messages.getConfigField("Wrong-Usage", "&7Wrong usage! Please type &6/eht help&7!"));
1919
NoPermission = Color.ColorFormat(messages.getConfigField("NoPermission", "&cYou do not have permission for this!"));
2020
}
2121
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package ru.enis.ehidetags.misc.logger;
2+
3+
import ru.enis.ehidetags.Core;
4+
5+
import java.util.logging.Logger;
6+
7+
public class Log {
8+
9+
private static Logger log;
10+
11+
public static void init() {
12+
log = Core.getInstance().getLogger();
13+
}
14+
15+
public static void info(String info) {
16+
log.info(info);
17+
}
18+
19+
public static void warn(String warn) {
20+
log.warning(warn);
21+
}
22+
23+
public static void error(String error) {
24+
log.severe(error);
25+
}
26+
27+
}

‎src/main/resources/plugin.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: eHideTags
2-
version: 1.4
2+
version: 1.5
33
main: ru.enis.ehidetags.Core
44
api-version: 1.13
55
author: Enis
66
description: Plugin to hide players nametags
7-
website: https://vk.com/rogablik
7+
website: ehttps://vk.com/rogablik
88
softdepend: [PlaceholderAPI]
99

1010
commands:
@@ -19,12 +19,16 @@ permissions:
1919
eht.reload: true
2020
eht.command: true
2121
eht.help: true
22+
eht.updatenotify: true
2223
eht.reload:
2324
description: Allows you to reload plugin
2425
default: op
2526
eht.command:
2627
description: Allows you to use /eht command
27-
default: false
28+
default: true
2829
eht.help:
2930
description: Allows you to use /eht help command
30-
default: false
31+
default: true
32+
eht.updatenotify:
33+
description: Allow you to get update notifications
34+
default: op

0 commit comments

Comments
 (0)
This repository has been archived.