1
0
mirror of https://github.com/nkomarn/harbor.git synced 2024-12-18 22:37:36 +01:00

Remove unneeded dependencies

This commit is contained in:
BuildTools 2019-05-08 07:21:08 -07:00
parent 73df60d41a
commit 0471928728
5 changed files with 7 additions and 18 deletions

View File

@ -20,7 +20,7 @@ values:
# Percent of players that need to sleep to skip night (must be between 0 to 100)
percent: 50
# Time that it takes to be considered AFK (in minutes)
timeout: 1
timeout: 10
features:
# Toggle night skipping feature. Configure amount of players needed to skip above (percent)
@ -85,14 +85,14 @@ messages:
# Display server version in console
running: "&7Running on version [version]."
# Sent in console when the plugin isn't compatible with the server
incompatible: "&7Spigot version [version] isn't compatible with Harbor."
incompatible: "&7Spigot [version] isn't compatible with Harbor."
# Harbor reload message
reloaded: "&7Reloaded Harbor."
reloaderror: "&7Error reloading Harbor."
# Sent when player doesn't have permissions to run command
permission: "&7Insufficient permissions."
# Sent when command argument isn't recognized
unrecognized: "&7Command not recognized."
unrecognized: "&7Urecognized command."
gui:
# Title for menu that shows when a player executes /sleeping

View File

@ -4,7 +4,6 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import mykyta.Harbor.Config;
import mykyta.Harbor.Harbor;

View File

@ -11,7 +11,6 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
@ -39,10 +38,6 @@ public class Sleeping implements CommandExecutor {
ItemStack item = new ItemStack(Material.PLAYER_HEAD, 1);
SkullMeta meta = (SkullMeta) item.getItemMeta();
meta.setDisplayName(ChatColor.GRAY + pl.getName());
/*ArrayList<String> lore = new ArrayList<String>();
lore.add("Custom head");
skull.setLore(lore);
*/
meta.setOwner(pl.getName());
item.setItemMeta(meta);
gui.setItem(sleeping.indexOf(pl), item);

View File

@ -1,6 +1,5 @@
package mykyta.Harbor.Events;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
@ -13,7 +12,6 @@ public class GUIEvent implements Listener {
@EventHandler
public void onClick(InventoryClickEvent event) {
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
Player p = ((Player) event.getWhoClicked());
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
}
@ -22,7 +20,6 @@ public class GUIEvent implements Listener {
@EventHandler
public void onDrag(InventoryDragEvent event) {
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
Player p = ((Player) event.getWhoClicked());
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
}

View File

@ -16,6 +16,7 @@ import mykyta.Harbor.NMS.NMS_1_12_R1;
import mykyta.Harbor.NMS.NMS_1_13_R1;
import mykyta.Harbor.NMS.NMS_1_13_R2;
import mykyta.Harbor.NMS.NMS_1_14_R1;
import mykyta.Harbor.NMS.NMS_1_7_R1;
import mykyta.Harbor.NMS.NMS_1_8_R1;
import mykyta.Harbor.NMS.NMS_1_9_R1;
import mykyta.Harbor.NMS.NMS_1_9_R2;
@ -44,12 +45,9 @@ public class Util {
enabled = false;
}
if (debug) Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.miscellaneous.prefix") + config.getString("messages.miscellaneous.running").replace("[version]", version)));
// FIXME maybe later
/*if (version.equals("v1_7_R1")) {
nms = new NMS_1_7_R1();
}*/
if (version.equals("v1_8_R1")) {nms = new NMS_1_8_R1();}
if (version.equals("v1_7_R1")) {nms = new NMS_1_7_R1();}
else if (version.equals("v1_8_R1")) {nms = new NMS_1_8_R1();}
//TODO more 1.8 versions
else if (version.equals("v1_9_R1")) {nms = new NMS_1_9_R1();}
else if (version.equals("v1_9_R2")) {nms = new NMS_1_9_R2();}