mirror of
https://github.com/songoda/EpicEnchants.git
synced 2025-01-21 23:41:27 +01:00
Drop support for Songoda UltimateBottles
I think it never got published
This commit is contained in:
parent
489bff3620
commit
9e4e198848
7
pom.xml
7
pom.xml
@ -125,13 +125,6 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateBottles</artifactId>
|
||||
<version>1_0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
|
@ -30,7 +30,6 @@ import com.songoda.epicenchants.listeners.item.WhiteScrollListener;
|
||||
import com.songoda.epicenchants.managers.EnchantManager;
|
||||
import com.songoda.epicenchants.managers.FileManager;
|
||||
import com.songoda.epicenchants.managers.GroupManager;
|
||||
import com.songoda.epicenchants.managers.HookManager;
|
||||
import com.songoda.epicenchants.managers.InfoManager;
|
||||
import com.songoda.epicenchants.objects.Enchant;
|
||||
import com.songoda.epicenchants.utils.EnchantUtils;
|
||||
@ -53,7 +52,6 @@ public class EpicEnchants extends SongodaPlugin {
|
||||
private InfoManager infoManager;
|
||||
private GroupManager groupManager;
|
||||
private FileManager fileManager;
|
||||
private HookManager hookManager;
|
||||
private CommandManager commandManager;
|
||||
|
||||
private SpecialItems specialItems;
|
||||
@ -105,13 +103,11 @@ public class EpicEnchants extends SongodaPlugin {
|
||||
this.infoManager = new InfoManager(this);
|
||||
this.specialItems = new SpecialItems(this);
|
||||
this.commandManager = new CommandManager(this);
|
||||
this.hookManager = new HookManager();
|
||||
this.itemGroup = new ItemGroup();
|
||||
|
||||
groupManager.loadGroups();
|
||||
enchantManager.loadEnchants();
|
||||
infoManager.loadMenus();
|
||||
hookManager.setup();
|
||||
|
||||
// Listeners
|
||||
guiManager.init();
|
||||
@ -183,10 +179,6 @@ public class EpicEnchants extends SongodaPlugin {
|
||||
return this.fileManager;
|
||||
}
|
||||
|
||||
public HookManager getHookManager() {
|
||||
return this.hookManager;
|
||||
}
|
||||
|
||||
public SpecialItems getSpecialItems() {
|
||||
return this.specialItems;
|
||||
}
|
||||
|
@ -1,5 +1,11 @@
|
||||
package com.songoda.epicenchants.enums;
|
||||
|
||||
public enum ItemType {
|
||||
BOOK, ENCHANTED, NONE
|
||||
BOOK,
|
||||
/**
|
||||
* @deprecated Was once used for UltimateBottles integration, but I don't think it ever got published
|
||||
*/
|
||||
@Deprecated
|
||||
ENCHANTED,
|
||||
NONE
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
package com.songoda.epicenchants.managers;
|
||||
|
||||
import com.songoda.ultimatebottles.UltimateBottles;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class HookManager {
|
||||
private UltimateBottles ultimateBottles;
|
||||
|
||||
public void setup() {
|
||||
ultimateBottles = Bukkit.getPluginManager().isPluginEnabled("UltimateBottles") ? (UltimateBottles) Bukkit.getPluginManager().getPlugin("UltimateBottles") : null;
|
||||
}
|
||||
|
||||
public Optional<UltimateBottles> getUltimateBottles() {
|
||||
return Optional.ofNullable(ultimateBottles);
|
||||
}
|
||||
}
|
@ -174,10 +174,6 @@ public class TinkererMenu extends FastInv {
|
||||
return BOOK;
|
||||
}
|
||||
|
||||
if (!instance.getHookManager().getUltimateBottles().isPresent()) {
|
||||
return NONE;
|
||||
}
|
||||
|
||||
if (!itemStack.getEnchantments().isEmpty() || (nbtItem.getCompound("enchants") != null && !nbtItem.getCompound("enchants").getKeys().isEmpty())) {
|
||||
if (getExpAmount(itemStack) == 0) {
|
||||
return NONE;
|
||||
@ -203,13 +199,8 @@ public class TinkererMenu extends FastInv {
|
||||
|
||||
addItem(emptySlot.get().getKey(), finalItemStack);
|
||||
|
||||
switch (itemType) {
|
||||
case BOOK:
|
||||
getInventory().setItem(emptySlot.get().getValue(), instance.getSpecialItems().getSecretDust(new NBTItem(finalItemStack)));
|
||||
break;
|
||||
case ENCHANTED:
|
||||
getInventory().setItem(emptySlot.get().getValue(), instance.getHookManager().getUltimateBottles().get().createBottle("Tinkerer", getExpAmount(finalItemStack)));
|
||||
break;
|
||||
if (itemType == BOOK) {
|
||||
getInventory().setItem(emptySlot.get().getValue(), instance.getSpecialItems().getSecretDust(new NBTItem(finalItemStack)));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -7,7 +7,6 @@ main: com.songoda.epicenchants.EpicEnchants
|
||||
softdepend:
|
||||
- PlaceholderAPI
|
||||
- PlayerPoints
|
||||
- UltimateBottles
|
||||
- Vault
|
||||
|
||||
author: Craftaro
|
||||
|
Loading…
Reference in New Issue
Block a user