mirror of
https://github.com/nkomarn/harbor.git
synced 2024-12-20 23:37:45 +01:00
Remove unneeded dependencies
This commit is contained in:
parent
73df60d41a
commit
0471928728
@ -20,7 +20,7 @@ values:
|
|||||||
# Percent of players that need to sleep to skip night (must be between 0 to 100)
|
# Percent of players that need to sleep to skip night (must be between 0 to 100)
|
||||||
percent: 50
|
percent: 50
|
||||||
# Time that it takes to be considered AFK (in minutes)
|
# Time that it takes to be considered AFK (in minutes)
|
||||||
timeout: 1
|
timeout: 10
|
||||||
|
|
||||||
features:
|
features:
|
||||||
# Toggle night skipping feature. Configure amount of players needed to skip above (percent)
|
# Toggle night skipping feature. Configure amount of players needed to skip above (percent)
|
||||||
@ -85,14 +85,14 @@ messages:
|
|||||||
# Display server version in console
|
# Display server version in console
|
||||||
running: "&7Running on version [version]."
|
running: "&7Running on version [version]."
|
||||||
# Sent in console when the plugin isn't compatible with the server
|
# 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
|
# Harbor reload message
|
||||||
reloaded: "&7Reloaded Harbor."
|
reloaded: "&7Reloaded Harbor."
|
||||||
reloaderror: "&7Error reloading Harbor."
|
reloaderror: "&7Error reloading Harbor."
|
||||||
# Sent when player doesn't have permissions to run command
|
# Sent when player doesn't have permissions to run command
|
||||||
permission: "&7Insufficient permissions."
|
permission: "&7Insufficient permissions."
|
||||||
# Sent when command argument isn't recognized
|
# Sent when command argument isn't recognized
|
||||||
unrecognized: "&7Command not recognized."
|
unrecognized: "&7Urecognized command."
|
||||||
|
|
||||||
gui:
|
gui:
|
||||||
# Title for menu that shows when a player executes /sleeping
|
# Title for menu that shows when a player executes /sleeping
|
||||||
|
@ -4,7 +4,6 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import mykyta.Harbor.Config;
|
import mykyta.Harbor.Config;
|
||||||
import mykyta.Harbor.Harbor;
|
import mykyta.Harbor.Harbor;
|
||||||
|
@ -11,7 +11,6 @@ import org.bukkit.command.CommandExecutor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
|
|
||||||
@ -39,10 +38,6 @@ public class Sleeping implements CommandExecutor {
|
|||||||
ItemStack item = new ItemStack(Material.PLAYER_HEAD, 1);
|
ItemStack item = new ItemStack(Material.PLAYER_HEAD, 1);
|
||||||
SkullMeta meta = (SkullMeta) item.getItemMeta();
|
SkullMeta meta = (SkullMeta) item.getItemMeta();
|
||||||
meta.setDisplayName(ChatColor.GRAY + pl.getName());
|
meta.setDisplayName(ChatColor.GRAY + pl.getName());
|
||||||
/*ArrayList<String> lore = new ArrayList<String>();
|
|
||||||
lore.add("Custom head");
|
|
||||||
skull.setLore(lore);
|
|
||||||
*/
|
|
||||||
meta.setOwner(pl.getName());
|
meta.setOwner(pl.getName());
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
gui.setItem(sleeping.indexOf(pl), item);
|
gui.setItem(sleeping.indexOf(pl), item);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package mykyta.Harbor.Events;
|
package mykyta.Harbor.Events;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
@ -13,7 +12,6 @@ public class GUIEvent implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onClick(InventoryClickEvent event) {
|
public void onClick(InventoryClickEvent event) {
|
||||||
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
|
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
|
||||||
Player p = ((Player) event.getWhoClicked());
|
|
||||||
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
|
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
|
||||||
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
|
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
|
||||||
}
|
}
|
||||||
@ -22,7 +20,6 @@ public class GUIEvent implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDrag(InventoryDragEvent event) {
|
public void onDrag(InventoryDragEvent event) {
|
||||||
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
|
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
|
||||||
Player p = ((Player) event.getWhoClicked());
|
|
||||||
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
|
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
|
||||||
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
|
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -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_R1;
|
||||||
import mykyta.Harbor.NMS.NMS_1_13_R2;
|
import mykyta.Harbor.NMS.NMS_1_13_R2;
|
||||||
import mykyta.Harbor.NMS.NMS_1_14_R1;
|
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_8_R1;
|
||||||
import mykyta.Harbor.NMS.NMS_1_9_R1;
|
import mykyta.Harbor.NMS.NMS_1_9_R1;
|
||||||
import mykyta.Harbor.NMS.NMS_1_9_R2;
|
import mykyta.Harbor.NMS.NMS_1_9_R2;
|
||||||
@ -45,11 +46,8 @@ public class Util {
|
|||||||
}
|
}
|
||||||
if (debug) Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.miscellaneous.prefix") + config.getString("messages.miscellaneous.running").replace("[version]", version)));
|
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_7_R1")) {
|
else if (version.equals("v1_8_R1")) {nms = new NMS_1_8_R1();}
|
||||||
nms = new NMS_1_7_R1();
|
|
||||||
}*/
|
|
||||||
if (version.equals("v1_8_R1")) {nms = new NMS_1_8_R1();}
|
|
||||||
//TODO more 1.8 versions
|
//TODO more 1.8 versions
|
||||||
else if (version.equals("v1_9_R1")) {nms = new NMS_1_9_R1();}
|
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();}
|
else if (version.equals("v1_9_R2")) {nms = new NMS_1_9_R2();}
|
||||||
|
Loading…
Reference in New Issue
Block a user