Much renaming and some movement

This commit is contained in:
Daniil Z committed 2021-03-01 00:26:00 +03:00
1 parent cc065c8dde
commit a1febc947f
69 files changed
+621 -606

No files matched your search

@@ -1,10 +1,10 @@
package me.william278.huskhomes2.commands;
import me.william278.huskhomes2.HuskHomes;
import me.william278.huskhomes2.integrations.vanishChecker;
import me.william278.huskhomes2.messageManager;
import me.william278.huskhomes2.objects.TeleportationPoint;
import me.william278.huskhomes2.teleportManager;
import me.william278.huskhomes2.integrations.VanishChecker;
import me.william278.huskhomes2.MessageManager;
import me.william278.huskhomes2.teleport.TeleportationPoint;
import me.william278.huskhomes2.teleport.TeleportManager;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -26,7 +26,7 @@ public class TpCommand extends CommandBase {
switch (args.length) {
case 1:
String targetPlayer = args[0];
teleportManager.teleportPlayer(p, targetPlayer);
TeleportManager.teleportPlayer(p, targetPlayer);
return true;
case 3:
try {
@@ -34,9 +34,9 @@ public class TpCommand extends CommandBase {
double y = Double.parseDouble(args[1]);
double z = Double.parseDouble(args[2]);
TeleportationPoint teleportationPoint = new TeleportationPoint(p.getWorld().getName(), x, y, z, 0F, 0F, HuskHomes.settings.getServerID());
teleportManager.teleportPlayer(p, teleportationPoint);
TeleportManager.teleportPlayer(p, teleportationPoint);
} catch (Exception e) {
messageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
}
return true;
case 4:
@@ -46,13 +46,13 @@ public class TpCommand extends CommandBase {
double z = Double.parseDouble(args[2]);
String worldName = args[3];
if (Bukkit.getWorld(worldName) == null) {
messageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
return true;
}
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, 0F, 0F, HuskHomes.settings.getServerID());
teleportManager.teleportPlayer(p, teleportationPoint);
TeleportManager.teleportPlayer(p, teleportationPoint);
} catch (Exception e) {
messageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> [world] [server]");
}
return true;
case 5:
@@ -64,21 +64,21 @@ public class TpCommand extends CommandBase {
String worldName = args[3];
String serverName = args[4];
if (Bukkit.getWorld(worldName) == null) {
messageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
return true;
}
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, 0F, 0F, serverName);
teleportManager.teleportPlayer(p, teleportationPoint);
TeleportManager.teleportPlayer(p, teleportationPoint);
} catch (Exception e) {
messageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server>");
}
} else {
messageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
}
return true;
}
} else {
messageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
}
return true;
}
@@ -91,7 +91,7 @@ public class TpCommand extends CommandBase {
ArrayList<String> players = new ArrayList<>();
if (args.length == 0 || args.length == 1) {
for (Player p : Bukkit.getOnlinePlayers()) {
if (!vanishChecker.isVanished(p) && !(p.getName().equals(sender.getName()))) {
if (!VanishChecker.isVanished(p) && !(p.getName().equals(sender.getName()))) {
players.add(p.getName());
}
}