Consistency fixes (#12)

* Consistency fixes

* Windows users need a batch file
This commit is contained in:
NotMyFault authored and GitHub committed 2020-09-14 18:44:16 +02:00
1 parent bc1d9a0312
commit 0fcf7cc0c9
8 files changed
+91 -11

No files matched your search

-1
View File
@@ -131,6 +131,5 @@ local.properties
/target/
checkstyle.xml
classes/
*.bat
docs/
build/
+1 -1
View File
@@ -22,7 +22,7 @@ This plugin is a collection of a lot of tiny features that help with building.
* [Issues](https://github.com/Brennian/Builders-Utilities/issues)
# Building
Gradle is the recommended way to build the project. Use `./gradlew build shadowJar` in the main project directory to build the project.
Gradle is the recommended way to build the project. Use `./gradlew build` in the main project directory to build the project.
# Contributing
See [here](https://github.com/Brennian/Builders-Utilities/blob/master/CONTRIBUTING.md)
Vendored
+84
View File
@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@@ -43,9 +43,9 @@ public class AdvancedFlyCommand implements ICommand {
}
if (PlayerMoveListener.togglePlayer(player)) {
player.sendMessage(Main.MSG_PREFIX + "Advanced Fly " + ChatColor.GREEN + ChatColor.ITALIC + "Enabled");
player.sendMessage(Main.MSG_PREFIX + "Advanced Fly " + ChatColor.GREEN + "enabled");
} else {
player.sendMessage(Main.MSG_PREFIX + "Advanced Fly " + ChatColor.RED + ChatColor.ITALIC + "Disabled");
player.sendMessage(Main.MSG_PREFIX + "Advanced Fly " + ChatColor.RED + "disabled");
}
}
}
@@ -45,10 +45,10 @@ public class NightVisionCommand implements ICommand {
if (player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) {
player.removePotionEffect(PotionEffectType.NIGHT_VISION);
player.sendMessage(Main.MSG_PREFIX + "Night Vision " + ChatColor.RED + ChatColor.ITALIC + "Disabled");
player.sendMessage(Main.MSG_PREFIX + "Night Vision " + ChatColor.RED + "disabled");
} else {
player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0, true, false));
player.sendMessage(Main.MSG_PREFIX + "Night Vision " + ChatColor.GREEN + ChatColor.ITALIC + "Enabled");
player.sendMessage(Main.MSG_PREFIX + "Night Vision " + ChatColor.GREEN + "enabled");
}
}
}
@@ -45,13 +45,13 @@ public class NoClipCommand implements ICommand {
if (NoClipManager.noClipPlayerIds.contains(player.getUniqueId())) {
NoClipManager.noClipPlayerIds.remove(player.getUniqueId());
player.sendMessage(Main.MSG_PREFIX + "NoClip " + ChatColor.RED + ChatColor.ITALIC + "Disabled");
player.sendMessage(Main.MSG_PREFIX + "NoClip " + ChatColor.RED + "disabled");
if (player.getGameMode() == GameMode.SPECTATOR) {
player.setGameMode(GameMode.CREATIVE);
}
} else {
NoClipManager.noClipPlayerIds.add(player.getUniqueId());
player.sendMessage(Main.MSG_PREFIX + "NoClip " + ChatColor.GREEN + ChatColor.ITALIC + "Enabled");
player.sendMessage(Main.MSG_PREFIX + "NoClip " + ChatColor.GREEN + "enabled");
}
}
}
@@ -29,7 +29,6 @@ import net.arcaniax.buildersutilities.Main;
import net.arcaniax.buildersutilities.commands.AdvancedFlyCommand;
import net.arcaniax.buildersutilities.commands.BannerCommand;
import net.arcaniax.buildersutilities.commands.ColorCommand;
import net.arcaniax.buildersutilities.commands.HelpCommand;
import net.arcaniax.buildersutilities.commands.SecretBlockCommand;
import net.arcaniax.buildersutilities.commands.NoClipCommand;
import net.arcaniax.buildersutilities.commands.NightVisionCommand;
@@ -48,7 +47,6 @@ import net.arcaniax.buildersutilities.commands.aliases.TwistAliasCommand;
import net.arcaniax.buildersutilities.commands.aliases.ScaleAliasCommand;
import net.arcaniax.buildersutilities.commands.aliases.WalkSpeedAliasCommand;
import net.arcaniax.buildersutilities.commands.aliases.FlySpeedAliasCommand;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -25,7 +25,6 @@
package net.arcaniax.buildersutilities.utils;
import net.arcaniax.buildersutilities.Main;
import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
import org.bukkit.block.banner.Pattern;