Compare commits
No commits in common. "ace286c9826aa320d21baf1e17f38df960aa6dba" and "9133bac1541dc4bd515cffc9cf3f23fc0909145c" have entirely different histories.
ace286c982
...
9133bac154
@ -16,7 +16,7 @@ import java.util.logging.Level;
|
||||
public class UhcCoreCommand implements CommandExecutor
|
||||
{
|
||||
|
||||
// Initialize the plugin variable, so we can access all the plugin's data.
|
||||
// Initialize the plugin variable so we can access all of the plugin's data.
|
||||
private UhcCore plugin;
|
||||
|
||||
// Initialize the debugger so I can debug the plugin.
|
||||
@ -46,18 +46,15 @@ public class UhcCoreCommand implements CommandExecutor
|
||||
}
|
||||
|
||||
// Check if there are any args.
|
||||
if(args.length == 0)
|
||||
if(args.length == 0 || args[0].equalsIgnoreCase("help"))
|
||||
{
|
||||
HelpCommand.infoCommand(commandSender, plugin);
|
||||
}
|
||||
// Check if there is a single argument after the command itself.
|
||||
else if (args.length == 1)
|
||||
{
|
||||
// Check subcommands.
|
||||
if(args[0].equalsIgnoreCase("help"))
|
||||
{
|
||||
HelpCommand.infoCommand(commandSender, plugin);
|
||||
}
|
||||
else if(args[0].equalsIgnoreCase("reload"))
|
||||
// Check if the args are "reload" and in case, do it.
|
||||
if(args[0].equalsIgnoreCase("reload"))
|
||||
{
|
||||
ReloadCommand.reloadCommand(commandSender);
|
||||
}
|
||||
@ -89,10 +86,23 @@ public class UhcCoreCommand implements CommandExecutor
|
||||
}
|
||||
else if(args[0].equalsIgnoreCase("start"))
|
||||
{
|
||||
StartCommand.startUhcCommand(commandSender, plugin);
|
||||
StartUhcCommand.startUhcCommand(commandSender, plugin);
|
||||
}
|
||||
|
||||
// TODO: PERMISSIONS! CONFIG!
|
||||
|
||||
// Check if the args are "textcomponent" and run that command.
|
||||
/*else if (args[0].equalsIgnoreCase("textcomponent"))
|
||||
{
|
||||
// We do not want the console to receive the TextComponent, so we're gonna disable it.
|
||||
if(senderIsConsole)
|
||||
{
|
||||
MessageUtils.sendLocalizedMessage(commandSender.getName(), LocalizedMessages.ERROR_CONSOLE_ACCESS_BLOCKED);
|
||||
return true;
|
||||
}
|
||||
// Everyone else will be able to run the TextComponent message.
|
||||
TextComponentCommand.textComponentCommand(commandSender);
|
||||
}*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ public class ReloadCommand
|
||||
|
||||
public static void reloadCommand(CommandSender commandSender)
|
||||
{
|
||||
debugger.sendDebugMessage(Level.INFO, "Reloading configuration files...");
|
||||
commandSender.sendMessage("Reloading configuration files...");
|
||||
debugger.sendDebugMessage(Level.INFO, "Reloading YAMLS...");
|
||||
commandSender.sendMessage("Reloading YAMLs...");
|
||||
FileUtils.checkFiles();
|
||||
FileUtils.reloadYamls();
|
||||
commandSender.sendMessage("Reloaded configuration files!");
|
||||
debugger.sendDebugMessage(Level.INFO, "Reloaded configuration files!");
|
||||
commandSender.sendMessage("Reloaded YAMLs!");
|
||||
debugger.sendDebugMessage(Level.INFO, "Reloaded YAMLs!");
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
||||
public class StartCommand {
|
||||
public class StartUhcCommand {
|
||||
|
||||
private static Debugger debugger = new Debugger(StartCommand.class.getName());
|
||||
private static Debugger debugger = new Debugger(StartUhcCommand.class.getName());
|
||||
|
||||
private static int loadDelay = 10;
|
||||
|
||||
@ -47,7 +47,7 @@ public class StartCommand {
|
||||
|
||||
double x = NumberUtils.getRandomNumberInRange(borderX - range + 1, borderX + range - 1) + 0.5;
|
||||
double z = NumberUtils.getRandomNumberInRange(borderZ - range + 1, borderZ + range - 1) + 0.5;
|
||||
int y = spawnWorld.getHighestBlockYAt((int) x, (int) z); // todo: this method is shit, use the one i already implemented in Factions...
|
||||
int y = spawnWorld.getHighestBlockYAt((int) x, (int) z); // todo: this method is shit, ushe the one i already implemented in Factions...
|
||||
|
||||
Location loc = new Location(spawnWorld, x, y + 1, z);
|
||||
|
@ -48,11 +48,7 @@ public class Cache {
|
||||
|
||||
public static List<Location>fireworksLocations = new ArrayList<>();
|
||||
|
||||
|
||||
public static int borderX, borderZ, borderSize;
|
||||
|
||||
// boolean to store whether the server has been set up for gameplay or not.
|
||||
// TODO: we haven't implemented any checks for this boolean in the loading phase.
|
||||
// we should implement it and use it eg. when people are joining the server, starting the game, etc...
|
||||
public static boolean isServerReady = false;
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: UHC-Core
|
||||
version: 0.0.136
|
||||
author: astro_bea
|
||||
author: mind_overflow
|
||||
api-version: '1.15'
|
||||
main: wtf.beatrice.uhccore.UhcCore
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user