alexmcs
/
ServerStopper
Archived
0
0
Fork 0
Browse Source

lots of things

I reorganized a lot of code and deleted some shit... I think. I dunno.
master
(someone) 5 years ago
parent
commit
552db93ee7
  1. 6
      .gitignore
  2. 7
      .gitlab-ci.yml
  3. 1
      .idea/.name
  4. 34
      .idea/compiler.xml
  5. 3
      .idea/copyright/profiles_settings.xml
  6. 71
      .idea/misc.xml
  7. 8
      .idea/modules.xml
  8. 4
      LICENSE.md
  9. 27
      ServerStopper.iml
  10. 8
      pom.xml
  11. 8
      src/main/java/net/alexmcs/bukkit/serverstopper/CommandServerstopper.java
  12. 4
      src/main/java/net/alexmcs/bukkit/serverstopper/CommandStop.java
  13. 9
      src/main/java/net/alexmcs/bukkit/serverstopper/ConfigManager.java
  14. 8
      src/main/java/net/alexmcs/bukkit/serverstopper/MainClass.java
  15. 8
      src/main/java/net/alexmcs/bukkit/serverstopper/NotifyManager.java
  16. 11
      src/main/java/net/alexmcs/bukkit/serverstopper/StopManager.java
  17. 14
      src/main/java/net/alexmcs/bukkit/serverstopper/Translations.java
  18. 10
      src/main/resources/bukkit-config.yml
  19. 2
      src/main/resources/bukkit-translations.yml
  20. 4
      src/main/resources/plugin.yml

6
.gitignore vendored

@ -1,7 +1,7 @@
# Ignore maven output
target/
out/
# Ignore some IDEA stuff
.idea/libraries
.idea/workspace.xml
.idea/vcs.xml
.idea/
ServerStopper.iml

7
.gitlab-ci.yml

@ -1,7 +0,0 @@
image: maven:3-jdk-8
build:
script: "mvn clean package"
artifacts:
paths:
- "target/*.jar"

1
.idea/.name

@ -1 +0,0 @@
ServerStopper

34
.idea/compiler.xml

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
<profile default="false" name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="true" />
<module name="ServerStopper" />
<module name="ServerStopper-maven" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="ServerStopper" target="1.7" />
<module name="ServerStopper-maven" target="1.7" />
</bytecodeTargetLevel>
</component>
</project>

3
.idea/copyright/profiles_settings.xml

@ -1,3 +0,0 @@
<component name="CopyrightManager">
<settings default="" />
</component>

71
.idea/misc.xml

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
<list size="1">
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
</list>
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>Android</id>
</State>
<State>
<id>Android &gt; Lint &gt; Correctness</id>
</State>
<State>
<id>Android Lint for Kotlin</id>
</State>
<State>
<id>Class structureJava</id>
</State>
<State>
<id>Code maturity issuesJava</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Java language level migration aidsJava</id>
</State>
<State>
<id>Javadoc issuesJava</id>
</State>
<State>
<id>Performance issuesJava</id>
</State>
<State>
<id>TestNGJava</id>
</State>
<State>
<id>Threading issuesJava</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>Class structureJava</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnConfiguration">
<configuration>$USER_HOME$/.subversion</configuration>
</component>
</project>

8
.idea/modules.xml

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/ServerStopper.iml" filepath="$PROJECT_DIR$/ServerStopper.iml" />
</modules>
</component>
</project>

4
LICENSE.md

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2016 AlexMCS (alexmcs.net)
Copyright (c) 2017 AlexMCS.net
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

27
ServerStopper.iml

@ -1,6 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module com.demonwav.mcdev.MinecraftModuleTypes="SPIGOT_MODULE_TYPE" org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>SPIGOT</platformType>
</autoDetectTypes>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
@ -10,18 +19,16 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.bukkit:bukkit:1.10.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:17.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.4" level="project" />
<orderEntry type="library" name="Maven: org.avaje:ebean:2.8.1" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
<orderEntry type="library" name="Maven: org.spigotmc:spigot-api:1.10.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: net.md-5:bungeecord-chat:1.10-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
<orderEntry type="library" name="Maven: org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: net.md-5:bungeecord-chat:1.12-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.inventivetalent:bossbarapi:2.4.1" level="project" />
<orderEntry type="library" name="Maven: org.mcstats.bukkit:metrics-lite:R8-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: io.puharesource.mc:TitleManager:1.5.11" level="project" />

8
pom.xml

@ -6,7 +6,7 @@
<groupId>net.alexmcs.bukkit</groupId>
<artifactId>ServerStopper</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.2-SNAPSHOT</version>
<build>
<plugins>
@ -50,7 +50,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<version>1.12.2-R0.1-SNAPSHOT</version>
</dependency>
<!-- CraftBukkit dep (I don't know how this is different from Bukkit, but whatever) -->
@ -58,7 +58,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<version>1.12.2-R0.1-SNAPSHOT</version>
</dependency>
-->
@ -66,7 +66,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<version>1.12.2-R0.1-SNAPSHOT</version>
</dependency>
<!-- BossBarAPI dep (soft) -->

8
src/main/java/net/alexmcs/bukkit/serverstopper/CommandServerstopper.java

@ -6,6 +6,8 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import static net.alexmcs.bukkit.serverstopper.MainClass.thisPlugin;
/**
* ServerStopper
* net.alexmcs.bukkit.serverstopper.CommandServerstopper
@ -30,6 +32,8 @@ class CommandServerstopper implements CommandExecutor {
if (sender.hasPermission("serverstopper.reload")) {
// Call ConfigManager.loadConfiguration() again.
ConfigManager.loadConfiguration();
thisPlugin.getLogger().info("ServerStopper configuration successfully reloaded by " + sender.getName());
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.reloadSuccess));
} else {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.errorPrefix + Translations.errorPermission));
}
@ -40,7 +44,7 @@ class CommandServerstopper implements CommandExecutor {
// The info command spits out some basic information about ServerStopper. Nothing too interesting here.
else if (arg1.equalsIgnoreCase("info") || arg1.equalsIgnoreCase("version") || arg1.equalsIgnoreCase("")) {
if (sender.hasPermission("serverstopper.info")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lServer&4&lStopper&a&l v" + Bukkit.getPluginManager().getPlugin("ServerStopper").getDescription().getVersion()));
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lServer&4&lStopper&a&l v" + thisPlugin.getDescription().getVersion()));
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "By &2&lAlex&6&lMCS&r / &b&lColton&4&lDRG&r"));
if (!Translations.aboutTranslator.equals("")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.aboutTranslator));
@ -56,7 +60,7 @@ class CommandServerstopper implements CommandExecutor {
// The help command spits out information on how to properly use ServerStopper. Nothing too interesting here.
else if (arg1.equalsIgnoreCase("help")) {
if (sender.hasPermission("serverstopper.help")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lServer&4&lStopper&a&l v" + Bukkit.getPluginManager().getPlugin("ServerStopper").getDescription().getVersion()));
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6&lServer&4&lStopper&a&l v" + thisPlugin.getDescription().getVersion()));
// PREPARE FOR THE MOST INSANE NESTED IF YOU'VE EVER SEEN!!!!!!!!!!!
if (!Translations.help1.equals("")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.help1));

4
src/main/java/net/alexmcs/bukkit/serverstopper/CommandStop.java

@ -46,7 +46,7 @@ class CommandStop implements CommandExecutor {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.errorPrefix + Translations.errorNotStopping));
} else {
// Send a call to the StopManager.initStop() method to cancel the stop.
StopManager.initStop(senderName, -1);
StopManager.initStop(sender, senderName, -1);
}
} else {
if (!ConfigManager.genericPermissionErrors) {
@ -129,7 +129,7 @@ class CommandStop implements CommandExecutor {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.errorPrefix + Translations.errorAlreadyStopping));
} else if (stopTime > ConfigManager.minDelay) {
// Send a call to the StopManager.initStop() method to stop the server in the given number of seconds.
StopManager.initStop(senderName, stopTime);
StopManager.initStop(sender, senderName, stopTime);
} else {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.errorPrefix + Translations.errorTooShort).replace("{count}", Integer.toString(ConfigManager.minDelay)));
}

9
src/main/java/net/alexmcs/bukkit/serverstopper/ConfigManager.java

@ -3,7 +3,6 @@ package net.alexmcs.bukkit.serverstopper;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.InputStream;
@ -11,6 +10,8 @@ import java.io.OutputStream;
import java.io.FileOutputStream;
import java.util.List;
import static net.alexmcs.bukkit.serverstopper.MainClass.thisPlugin;
/**
* ServerStopper
* net.alexmcs.bukkit.serverstopper.ConfigManager
@ -34,6 +35,7 @@ class ConfigManager {
private static boolean bossbarEnable; // bossbar.enable
static int bossbarSimpleCountdown; // bossbar.countdown
static String bossbarSimpleColor; // bossbar.color
static boolean bossbarGhetto; // bossbar.ghetto
// Add colourshift options later.
// TitleManager API options
@ -73,8 +75,6 @@ class ConfigManager {
static boolean titleManagerTabHeaderEnabled;
static String titleManagerTabHeader;
// ConfigManager can locate the plugin from a static context with this. I'm not sure if this is really the best place for this, but I also don't really give a fuck.
static Plugin thisPlugin = Bukkit.getPluginManager().getPlugin("ServerStopper");
static void loadConfiguration() {
@ -148,7 +148,7 @@ class ConfigManager {
thisPlugin.getLogger().warning("Your configuration version could not be detected!");
thisPlugin.getLogger().warning("Your configuration may be invalid.");
thisPlugin.getLogger().warning("If you see problems or ignored values, backup and delete your configuration to let the plugin regenerate it.");
} else if (!configVersion.equals("1.1")) {
} else if (!configVersion.equals("10")) {
thisPlugin.getLogger().warning("Your configuration version is invalid!");
thisPlugin.getLogger().warning("Your configuration may be invalid.");
thisPlugin.getLogger().warning("If you see problems or ignored values, backup and delete your configuration to let the plugin regenerate it.");
@ -172,6 +172,7 @@ class ConfigManager {
apiBossbar = "BossBarAPI";
} else {
thisPlugin.getLogger().warning("BossBarAPI is not installed. If you don't want to use the BossBar, you can ignore this. You can suppress this warning by setting bossbar.enable: false in config.yml");
thisPlugin.getLogger().warning("If you need a version of BossBarAPI that works with the latest version of Minecraft, you can get it here: https://git.drg.li/AlexMCS/BossBarAPI/releases");
apiBossbar = "none";
}
} else {

8
src/main/java/net/alexmcs/bukkit/serverstopper/MainClass.java

@ -1,6 +1,7 @@
package net.alexmcs.bukkit.serverstopper;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
/**
@ -12,9 +13,12 @@ public class MainClass extends JavaPlugin implements Listener {
// This method is called when the plugin is enabled. (duh!) It registers the commands and does some other cool stuff.
// There is a little bit of processing done here, but much of it is just spitting out information to the console.
static Plugin thisPlugin;
@Override
public void onEnable() {
thisPlugin = this;
// Set up commands (registration is done in plugin.yml)
this.getCommand("stop").setExecutor(new CommandStop());
this.getCommand("cancelstop").setExecutor(new CommandCancelstop());
@ -25,10 +29,10 @@ public class MainClass extends JavaPlugin implements Listener {
// Informational
getLogger().info("Enabled ServerStopper");
getLogger().info("Minecraft ServerStopper v" + getDescription().getVersion());
getLogger().info(Translations.pluginName + " v" + Translations.version);
getLogger().info("for Bukkit/Spigot/Paper");
getLogger().info("ServerStopper replaces Minecraft's /stop command with a better version that warns users before the server shuts down.");
getLogger().info("https://gitlab.com/AlexMCS/ServerStopper");
getLogger().info(Translations.website);
}

8
src/main/java/net/alexmcs/bukkit/serverstopper/NotifyManager.java

@ -11,9 +11,7 @@ import org.bukkit.scheduler.BukkitRunnable;
import org.inventivetalent.bossbar.BossBar;
import org.inventivetalent.bossbar.BossBarAPI;
import static net.alexmcs.bukkit.serverstopper.ConfigManager.thisPlugin;
import static net.alexmcs.bukkit.serverstopper.ConfigManager.apiBossbar;
import static net.alexmcs.bukkit.serverstopper.ConfigManager.apiTitles;
import static net.alexmcs.bukkit.serverstopper.MainClass.thisPlugin;
/**
* ServerStopper
@ -61,7 +59,7 @@ class NotifyManager {
}
// BossBarAPI
if (apiBossbar.equals("BossBarAPI")) {
if (ConfigManager.apiBossbar.equals("BossBarAPI")) {
BossBar bossBar = BossBarAPI.addBar(new TextComponent(ChatColor.translateAlternateColorCodes('&', Translations.bossbarWarning.replace("{count}", count).replace("{timeunits}", timeunits))), BossBarAPI.Color.valueOf(ConfigManager.bossbarSimpleColor), BossBarAPI.Style.PROGRESS, (float)clock/ConfigManager.bossbarSimpleCountdown);
for (Player pl : Bukkit.getServer().getOnlinePlayers()) {
if (clock <= ConfigManager.bossbarSimpleCountdown && clock > -1) {
@ -74,7 +72,7 @@ class NotifyManager {
}
// TitleManager API
if (apiTitles.equals("TitleManager")) {
if (ConfigManager.apiTitles.equals("TitleManager")) {
String tmSubtitle = "";
String tmTitle = "";
boolean doSetTitle = false;

11
src/main/java/net/alexmcs/bukkit/serverstopper/StopManager.java

@ -2,9 +2,10 @@ package net.alexmcs.bukkit.serverstopper;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.scheduler.BukkitRunnable;
import static net.alexmcs.bukkit.serverstopper.ConfigManager.thisPlugin;
import static net.alexmcs.bukkit.serverstopper.MainClass.thisPlugin;
/**
* ServerStopper
@ -40,7 +41,7 @@ class StopManager {
}
// This method is called by the other classes to actually process any operations.
static void initStop(String displayName, int time) {
static void initStop(CommandSender sender, String displayName, int time) {
// If the integer passed for time is -1, the user intended to cancel the pending stop.
if (time == -1) {
@ -48,6 +49,9 @@ class StopManager {
// Tell all server users that the stop was canceled.
if (ConfigManager.notify) {
Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', Translations.broadcastPrefix + Translations.broadcastCancel.replace("{displayname}", displayName)));
} else {
thisPlugin.getLogger().info(ChatColor.translateAlternateColorCodes('&', Translations.broadcastCancel.replace("{displayname}", displayName)));
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.broadcastCancel.replace("{displayname}", displayName)));
}
// Cancel the stop. Simply setting the clock to -1 is fine, as this will abort the while loop.
clock = -1;
@ -61,6 +65,9 @@ class StopManager {
// Notify all server users that someone has scheduled a stop.
if (ConfigManager.notify) {
Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', Translations.broadcastPrefix + Translations.broadcastNotify.replace("{displayname}", displayName).replace("{count}", Integer.toString(time)).replace("{timeunits}", "seconds")));
} else {
thisPlugin.getLogger().info(ChatColor.translateAlternateColorCodes('&', Translations.broadcastNotify.replace("{displayname}", displayName).replace("{count}", Integer.toString(time)).replace("{timeunits}", "seconds")));
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Translations.broadcastNotify.replace("{displayname}", displayName).replace("{count}", Integer.toString(time)).replace("{timeunits}", "seconds")));
}
// Set the clock to the integer passed for time. This will reflect seconds in real world time.
clock = time;

14
src/main/java/net/alexmcs/bukkit/serverstopper/Translations.java

@ -5,7 +5,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import static net.alexmcs.bukkit.serverstopper.ConfigManager.thisPlugin;
import static net.alexmcs.bukkit.serverstopper.MainClass.thisPlugin;
/**
* ServerStopper
@ -19,6 +19,10 @@ class Translations {
// See the comments in the bukkit-translations.yml resource for the commented key for information on each String.
static String pluginName;
static String version;
static String website;
static String broadcastPrefix; // chat-broadcast.prefix
static String broadcastWarning; // chat-broadcast.warning
static String broadcastNotify; // chat-broadcast.notify
@ -58,6 +62,8 @@ class Translations {
static String aboutHelp; // about.help
static String aboutUri; // about.uri
static String reloadSuccess; // reload
// Store these values in ProxyHelper class?
static String phBossbarWarning; // bungeecord.bossbar-warning
static String phTmAbWarning; // bungeecord.actionbar-warning
@ -71,6 +77,10 @@ class Translations {
static void loadTranslations() {
pluginName = thisPlugin.getName();
version = thisPlugin.getDescription().getVersion();
website = thisPlugin.getDescription().getWebsite();
File translationFile = new File(thisPlugin.getDataFolder(), "translations.yml");
// The ability to focus is something I do not possess.
@ -128,6 +138,8 @@ class Translations {
aboutHelp = translations.getString("about.help", noTranslation);
aboutUri = translations.getString("about.uri", noTranslation);
reloadSuccess = translations.getString("reload", noTranslation);
phBossbarWarning = translations.getString("bungeecord.bossbar-warning", noTranslation);
phTmAbWarning = translations.getString("bungeecord.actionbar-warning", noTranslation);
phTmSubWarning = translations.getString("bungeecord.subtitle-warning", noTranslation);

10
src/main/resources/bukkit-config.yml

@ -21,6 +21,7 @@ warnings:
countdown: 10
# BossBarAPI support
# This uses InventiveTalent's outdated BossBarAPI. A version that has been updated to work with the latest versions of Minecraft can be found here: https://git.drg.li/AlexMCS/BossBarAPI/releases
bossbar:
# Set enable: false if you do not want to use BossBarAPI to show the shutdown warnings.
enable: true
@ -30,6 +31,7 @@ bossbar:
color: "RED"
# TitleManager API support
# This uses Puharesource's TitleManager. If you want these features without TitleManager's features, install it and set "using-config: false" in it's config.
titles:
# Set enable: false if you do not want to use TitleManager API to show the shutdown warnings.
enable: true
@ -69,7 +71,7 @@ bungeecord:
bossbar: true
# The titles settings, if enabled, are shared with this instance of ServerStopper, excepting tabfoot.
titles: true
# Display proxy countdown in tab footer? Requires titles: true above.
# Display proxy countdown in tab footer? Requires titles.enable: true above.
tabfoot: true
@ -83,12 +85,12 @@ notify: true # Disabling this option might be a little buggy right now. I haven'
calculate-timeunits: false # This option might be a little buggy right now. I haven't properly tested it.
# If true, allow 'msg <kickmessage>' to be added to the end of any /stop based command.
allow-msg: false # This option might be a little buggy right now. I haven't properly tested it.
allow-msg: false # This feature is not implemented as of the version of ServerStopper this config was generated with.
# Use the above message as the kick message. To use it in broadcasts, add {msg} to the translations file.
msg-kick: true # This feature will be implemented in 1.2-ish?
msg-kick: true # This feature is not implemented as of the version of ServerStopper this config was generated with.
# These options may have been stablized and moved into the above secion in a later version of ProxyStopper. Check the wiki page for more information.
# These options may have been stablized and moved into the above section in a later version of ProxyStopper. Check the wiki page for more information.
# You're all done!

2
src/main/resources/bukkit-translations.yml

@ -64,6 +64,8 @@ about:
help: "&aTo learn how to use ServerStopper, do &b&l/serverstopper help&a."
uri: "&cMore information: &9http://gitlab.com/AlexMCS/ServerStopper/"
reload: "&aServerStopper configuration successfully reloaded."
# Translations for ProxyStopper integration, not to be confused with the bungeecord section of config.yml
# All other ProxyStopper translations should be done in the ProxyStopper configuration.
bungeecord:

4
src/main/resources/plugin.yml

@ -1,8 +1,8 @@
name: ServerStopper
version: 1.1-SNAPSHOT
version: 1.2-SNAPSHOT
author: ColtonDRG / AlexMCS
main: net.alexmcs.bukkit.serverstopper.MainClass
website: https://gitlab.com/AlexMCS/ServerStopper/
website: https://git.drg.li/AlexMCS/ServerStopper/
# Soft depend upon all our glorious APIs
# All this does is ensure that these are loaded before our plugin *if* they are in fact present.