Skip to content

Commit

Permalink
Drop support for WE 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Spazzinq committed Sep 20, 2024
1 parent 51d69c9 commit e34b7c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void onEnable() {
private void registerManagers() {
boolean isNewSpigotAPI = true;

for (int i = 8; i < 13; i++) {
for (int i = 13; i < 21; i++) {
if (getServer().getBukkitVersion().contains("1." + i)) {
isNewSpigotAPI = false;
break;
Expand All @@ -96,7 +96,7 @@ private void registerManagers() {
updateManager = new UpdateManager();

checkManager = new CheckManager();
hookManager = new HookManager(isNewSpigotAPI);
hookManager = new HookManager();
particle = isNewSpigotAPI ? new ParticleNewAPI() : new ParticleOldAPI();

flightManager = new FlightManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
import org.spazzinq.flightcontrol.multiversion.WorldGuardGenericHook;
import org.spazzinq.flightcontrol.multiversion.current.FactionsUUIDHook;
import org.spazzinq.flightcontrol.multiversion.current.WorldGuard7Hook;
import org.spazzinq.flightcontrol.multiversion.legacy.WorldGuard6Hook;
import org.spazzinq.flightcontrol.placeholder.ClipPlaceholder;

import java.util.ArrayList;

public class HookManager {
private final FlightControl pl;
private final PluginManager pm;
private final boolean isNewSpigotAPI;

@Getter private String hookedMsg;
private final ArrayList<String> hooked = new ArrayList<>();
Expand All @@ -29,9 +27,8 @@ public class HookManager {
@Getter private WorldGuardGenericHook worldGuardHook = new WorldGuardGenericHook();
@Getter private FactionsGenericHook factionsHook = new FactionsGenericHook();

public HookManager(boolean isNewSpigotAPI) {
public HookManager() {
pl = FlightControl.getInstance();
this.isNewSpigotAPI = isNewSpigotAPI;
pm = pl.getServer().getPluginManager();
}

Expand All @@ -40,7 +37,7 @@ public void loadHooks() {
loadPlaceholderHooks();

if (pluginLoading("WorldGuard")) {
worldGuardHook = isNewSpigotAPI ? new WorldGuard7Hook() : new WorldGuard6Hook();
worldGuardHook = new WorldGuard7Hook();
}

printLoadedHooks();
Expand Down
7 changes: 0 additions & 7 deletions VersionOld/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,4 @@ dependencies {
implementation project(':Multiversion')

compileOnly('org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT') { exclude(group: "*") }
compileOnly ('com.sk89q.worldguard:worldguard-legacy:6.1.3-SNAPSHOT') {
exclude group: 'com.google.code.gson'
exclude group: 'com.google.guava'
exclude group: 'junit'
exclude group: 'org.yaml'
exclude group: 'maven'
}
}

This file was deleted.

0 comments on commit e34b7c5

Please sign in to comment.