From acb0717644785f591da5453077607c30dcaab669 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sat, 11 Apr 2015 00:03:42 +0200 Subject: [PATCH] Spigot 1.8: More deprecation --- .../minecraft/limitedcreative/FeatureBlockItemSpawn.java | 2 +- .../minecraft/limitedcreative/FeatureSwitchGameMode.java | 1 + .../java/de/jaschastarke/minecraft/limitedcreative/Hooks.java | 4 ++-- .../minecraft/limitedcreative/ModInventories.java | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java index 79f2039..ed6aded 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java @@ -47,7 +47,7 @@ public class FeatureBlockItemSpawn extends CoreModule implement private void scheduleCleanUp() { if (cleanup.maxTime == 0) { // if not scheduled yet cleanup.maxTime = System.currentTimeMillis(); - plugin.getServer().getScheduler().runTaskLater(plugin, cleanup, TICK_OFFSET); + cleanup.runTaskLater(plugin, TICK_OFFSET); } } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureSwitchGameMode.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureSwitchGameMode.java index 0309f7d..f038293 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureSwitchGameMode.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureSwitchGameMode.java @@ -69,6 +69,7 @@ public class FeatureSwitchGameMode extends CoreModule { return SwitchGameModePermissions.ALL.getPermission(subPerm); } + @SuppressWarnings("deprecation") protected boolean changeGameMode(CommandContext context, String player, GameMode tgm, IAbstractPermission permission) throws MissingPermissionCommandException, CommandException { Player target = null; if (player != null && !player.isEmpty()) { diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/Hooks.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/Hooks.java index 009e323..4e4e7e1 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/Hooks.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/Hooks.java @@ -4,7 +4,6 @@ import org.bukkit.Bukkit; import de.jaschastarke.hooking.BooleanHooker; import de.jaschastarke.hooking.GetHooker; -import de.jaschastarke.minecraft.limitedcreative.hooks.AuthMeHooks; import de.jaschastarke.minecraft.limitedcreative.hooks.MultiVerseHooks; import de.jaschastarke.minecraft.limitedcreative.hooks.PlayerCheckHooker; import de.jaschastarke.minecraft.limitedcreative.hooks.WorldTypeHooker; @@ -20,6 +19,7 @@ public final class Hooks { return Bukkit.getServer().getPluginManager().isPluginEnabled(pluginName); } + @SuppressWarnings("deprecation") public static void inizializeHooks(LimitedCreative plugin) { IsLoggedIn.clearHooks(); DefaultWorldGameMode.clearHooks(); @@ -27,7 +27,7 @@ public final class Hooks { InventoryIncompatible.clearHooks(); if (isAuthMePresent()) { - new AuthMeHooks(plugin); + new de.jaschastarke.minecraft.limitedcreative.hooks.AuthMeHooks(plugin); } if (isXAuth20Present()) { new xAuthHooks(plugin); diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModInventories.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModInventories.java index e26cd41..dc17308 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModInventories.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModInventories.java @@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack; import de.jaschastarke.bukkit.lib.CoreModule; import de.jaschastarke.minecraft.limitedcreative.inventories.ArmoryConfig; -import de.jaschastarke.minecraft.limitedcreative.inventories.AuthMeInventories; import de.jaschastarke.minecraft.limitedcreative.inventories.Inventory; import de.jaschastarke.minecraft.limitedcreative.inventories.InventoryConfig; import de.jaschastarke.minecraft.limitedcreative.inventories.InventoryPermissions; @@ -34,6 +33,7 @@ public class ModInventories extends CoreModule { return "Inventory"; } + @SuppressWarnings("deprecation") @Override public void initialize(ModuleEntry entry) { super.initialize(entry); @@ -42,7 +42,7 @@ public class ModInventories extends CoreModule { armor_config = config.registerSection(new ArmoryConfig(this)); if (Hooks.isAuthMePresent()) { - addModule(new AuthMeInventories(plugin, this)); + addModule(new de.jaschastarke.minecraft.limitedcreative.inventories.AuthMeInventories(plugin, this)); } String incomp = Hooks.InventoryIncompatible.test(); if (config.getEnabled() && incomp != null) {