Skip to content

Commit

Permalink
Add spigot 1.17 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsLewizzz committed Jun 11, 2021
1 parent 2eede2c commit 36f4534
Show file tree
Hide file tree
Showing 64 changed files with 281 additions and 159 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>fun.lewisdev</groupId>
<artifactId>DeluxeHub</artifactId>
<version>3.3.9</version>
<version>3.3.10</version>
<packaging>jar</packaging>

<name>DeluxeHub</name>
Expand Down Expand Up @@ -160,7 +160,7 @@
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.6.0</version>
<version>2.8.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.shynixn.headdatabase</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import java.util.logging.Level;

public class DeluxeHub extends JavaPlugin {
public class DeluxeHubPlugin extends JavaPlugin {

private static final int BSTATS_ID = 3151;
public static int SERVER_VERSION;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fun/lewisdev/deluxehub/action/Action.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package fun.lewisdev.deluxehub.action;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import org.bukkit.entity.Player;

public interface Action {

String getIdentifier();

void execute(DeluxeHub plugin, Player player, String data);
void execute(DeluxeHubPlugin plugin, Player player, String data);

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.actions.*;
import fun.lewisdev.deluxehub.utility.PlaceholderUtil;
import org.apache.commons.lang.StringUtils;
Expand All @@ -13,10 +13,10 @@

public class ActionManager {

private DeluxeHub plugin;
private DeluxeHubPlugin plugin;
private Map<String, Action> actions;

public ActionManager(DeluxeHub plugin) {
public ActionManager(DeluxeHubPlugin plugin) {
this.plugin = plugin;
actions = new HashMap<>();
load();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import fun.lewisdev.deluxehub.utility.TextUtil;
import fun.lewisdev.deluxehub.utility.reflection.ActionBar;
Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
ActionBar.sendActionBar(player, TextUtil.color(data));
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.utility.TextUtil;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.Bukkit;
Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
if (data.contains("<center>") && data.contains("</center>")) data = TextUtil.getCenteredMessage(data);

for (Player p : Bukkit.getOnlinePlayers()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.entity.Player;

Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("ConnectOther");
out.writeUTF(player.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.entity.Player;

Expand All @@ -12,7 +12,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
player.closeInventory();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.entity.Player;

Expand All @@ -12,7 +12,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
player.chat(data.contains("/") ? data : "/" + data);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
Expand All @@ -13,7 +13,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), data);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
try {
player.setGameMode(GameMode.valueOf(data.toUpperCase()));
} catch (IllegalArgumentException ex) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import fun.lewisdev.deluxehub.inventory.AbstractInventory;
import org.bukkit.entity.Player;
Expand All @@ -13,7 +13,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
AbstractInventory inventory = plugin.getInventoryManager().getInventory(data);

if (inventory != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.utility.TextUtil;
import fun.lewisdev.deluxehub.action.Action;
import org.bukkit.entity.Player;
Expand All @@ -13,7 +13,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
if (data.contains("<center>") && data.contains("</center>")) data = TextUtil.getCenteredMessage(data);
player.sendMessage(TextUtil.color(data));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import fun.lewisdev.deluxehub.utility.universal.XPotion;
import org.bukkit.entity.Player;
Expand All @@ -13,7 +13,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
String[] args = data.split(";");
player.addPotionEffect(XPotion.matchXPotion(args[0]).get().parsePotion(1000000, Integer.parseInt(args[1]) - 1));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import fun.lewisdev.deluxehub.utility.universal.XSound;
import org.bukkit.Bukkit;
Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
try {
player.playSound(player.getLocation(), XSound.matchXSound(data).get().parseSound(), 1L, 1L);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fun.lewisdev.deluxehub.action.actions;

import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.action.Action;
import fun.lewisdev.deluxehub.utility.TextUtil;
import fun.lewisdev.deluxehub.utility.reflection.Titles;
Expand All @@ -14,7 +14,7 @@ public String getIdentifier() {
}

@Override
public void execute(DeluxeHub plugin, Player player, String data) {
public void execute(DeluxeHubPlugin plugin, Player player, String data) {
String[] args = data.split(";");

String mainTitle = TextUtil.color(args[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import cl.bgmp.minecraft.util.commands.CommandsManager;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import cl.bgmp.minecraft.util.commands.injection.SimpleInjector;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.command.commands.*;
import fun.lewisdev.deluxehub.command.commands.gamemode.*;
import fun.lewisdev.deluxehub.config.ConfigType;
Expand All @@ -16,15 +16,15 @@

public class CommandManager {

private DeluxeHub plugin;
private DeluxeHubPlugin plugin;
private FileConfiguration config;

private CommandsManager commands;
private CommandsManagerRegistration commandRegistry;

private List<CustomCommand> customCommands;

public CommandManager(DeluxeHub plugin) {
public CommandManager(DeluxeHubPlugin plugin) {
this.plugin = plugin;
this.config = plugin.getConfigManager().getFile(ConfigType.COMMANDS).getConfig();
this.customCommands = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import cl.bgmp.minecraft.util.commands.CommandContext;
import cl.bgmp.minecraft.util.commands.annotations.Command;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.Permissions;
import fun.lewisdev.deluxehub.config.Messages;
import org.bukkit.Bukkit;
Expand All @@ -12,7 +12,7 @@

public class ClearchatCommand {

public ClearchatCommand(DeluxeHub plugin) {
public ClearchatCommand(DeluxeHubPlugin plugin) {
}

@Command(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import cl.bgmp.minecraft.util.commands.CommandContext;
import cl.bgmp.minecraft.util.commands.annotations.Command;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.Permissions;
import fun.lewisdev.deluxehub.command.CommandManager;
import fun.lewisdev.deluxehub.config.Messages;
Expand All @@ -28,9 +28,9 @@

public class DeluxeHubCommand {

private DeluxeHub plugin;
private DeluxeHubPlugin plugin;

public DeluxeHubCommand(DeluxeHub plugin) {
public DeluxeHubCommand(DeluxeHubPlugin plugin) {
this.plugin = plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import cl.bgmp.minecraft.util.commands.CommandContext;
import cl.bgmp.minecraft.util.commands.annotations.Command;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.Permissions;
import fun.lewisdev.deluxehub.config.Messages;
import org.bukkit.Bukkit;
Expand All @@ -12,7 +12,7 @@

public class FlyCommand {

public FlyCommand(DeluxeHub plugin) {
public FlyCommand(DeluxeHubPlugin plugin) {
}

@Command(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import cl.bgmp.minecraft.util.commands.CommandContext;
import cl.bgmp.minecraft.util.commands.annotations.Command;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.module.ModuleType;
import fun.lewisdev.deluxehub.module.modules.world.LobbySpawn;
import fun.lewisdev.deluxehub.utility.TextUtil;
Expand All @@ -14,9 +14,9 @@

public class LobbyCommand {

private DeluxeHub plugin;
private DeluxeHubPlugin plugin;

public LobbyCommand(DeluxeHub plugin) {
public LobbyCommand(DeluxeHubPlugin plugin) {
this.plugin = plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import cl.bgmp.minecraft.util.commands.CommandContext;
import cl.bgmp.minecraft.util.commands.annotations.Command;
import cl.bgmp.minecraft.util.commands.exceptions.CommandException;
import fun.lewisdev.deluxehub.DeluxeHub;
import fun.lewisdev.deluxehub.DeluxeHubPlugin;
import fun.lewisdev.deluxehub.Permissions;
import fun.lewisdev.deluxehub.config.Messages;
import fun.lewisdev.deluxehub.module.ModuleType;
Expand All @@ -12,9 +12,9 @@

public class LockchatCommand {

private DeluxeHub plugin;
private DeluxeHubPlugin plugin;

public LockchatCommand(DeluxeHub plugin) {
public LockchatCommand(DeluxeHubPlugin plugin) {
this.plugin = plugin;
}

Expand Down
Loading

0 comments on commit 36f4534

Please sign in to comment.