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>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.songoda</groupId>
|
|
||||||
<artifactId>UltimateBottles</artifactId>
|
|
||||||
<version>1_0</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<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.EnchantManager;
|
||||||
import com.songoda.epicenchants.managers.FileManager;
|
import com.songoda.epicenchants.managers.FileManager;
|
||||||
import com.songoda.epicenchants.managers.GroupManager;
|
import com.songoda.epicenchants.managers.GroupManager;
|
||||||
import com.songoda.epicenchants.managers.HookManager;
|
|
||||||
import com.songoda.epicenchants.managers.InfoManager;
|
import com.songoda.epicenchants.managers.InfoManager;
|
||||||
import com.songoda.epicenchants.objects.Enchant;
|
import com.songoda.epicenchants.objects.Enchant;
|
||||||
import com.songoda.epicenchants.utils.EnchantUtils;
|
import com.songoda.epicenchants.utils.EnchantUtils;
|
||||||
|
@ -53,7 +52,6 @@ public class EpicEnchants extends SongodaPlugin {
|
||||||
private InfoManager infoManager;
|
private InfoManager infoManager;
|
||||||
private GroupManager groupManager;
|
private GroupManager groupManager;
|
||||||
private FileManager fileManager;
|
private FileManager fileManager;
|
||||||
private HookManager hookManager;
|
|
||||||
private CommandManager commandManager;
|
private CommandManager commandManager;
|
||||||
|
|
||||||
private SpecialItems specialItems;
|
private SpecialItems specialItems;
|
||||||
|
@ -105,13 +103,11 @@ public class EpicEnchants extends SongodaPlugin {
|
||||||
this.infoManager = new InfoManager(this);
|
this.infoManager = new InfoManager(this);
|
||||||
this.specialItems = new SpecialItems(this);
|
this.specialItems = new SpecialItems(this);
|
||||||
this.commandManager = new CommandManager(this);
|
this.commandManager = new CommandManager(this);
|
||||||
this.hookManager = new HookManager();
|
|
||||||
this.itemGroup = new ItemGroup();
|
this.itemGroup = new ItemGroup();
|
||||||
|
|
||||||
groupManager.loadGroups();
|
groupManager.loadGroups();
|
||||||
enchantManager.loadEnchants();
|
enchantManager.loadEnchants();
|
||||||
infoManager.loadMenus();
|
infoManager.loadMenus();
|
||||||
hookManager.setup();
|
|
||||||
|
|
||||||
// Listeners
|
// Listeners
|
||||||
guiManager.init();
|
guiManager.init();
|
||||||
|
@ -183,10 +179,6 @@ public class EpicEnchants extends SongodaPlugin {
|
||||||
return this.fileManager;
|
return this.fileManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HookManager getHookManager() {
|
|
||||||
return this.hookManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SpecialItems getSpecialItems() {
|
public SpecialItems getSpecialItems() {
|
||||||
return this.specialItems;
|
return this.specialItems;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
package com.songoda.epicenchants.enums;
|
package com.songoda.epicenchants.enums;
|
||||||
|
|
||||||
public enum ItemType {
|
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;
|
return BOOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!instance.getHookManager().getUltimateBottles().isPresent()) {
|
|
||||||
return NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!itemStack.getEnchantments().isEmpty() || (nbtItem.getCompound("enchants") != null && !nbtItem.getCompound("enchants").getKeys().isEmpty())) {
|
if (!itemStack.getEnchantments().isEmpty() || (nbtItem.getCompound("enchants") != null && !nbtItem.getCompound("enchants").getKeys().isEmpty())) {
|
||||||
if (getExpAmount(itemStack) == 0) {
|
if (getExpAmount(itemStack) == 0) {
|
||||||
return NONE;
|
return NONE;
|
||||||
|
@ -203,13 +199,8 @@ public class TinkererMenu extends FastInv {
|
||||||
|
|
||||||
addItem(emptySlot.get().getKey(), finalItemStack);
|
addItem(emptySlot.get().getKey(), finalItemStack);
|
||||||
|
|
||||||
switch (itemType) {
|
if (itemType == BOOK) {
|
||||||
case BOOK:
|
getInventory().setItem(emptySlot.get().getValue(), instance.getSpecialItems().getSecretDust(new NBTItem(finalItemStack)));
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -7,7 +7,6 @@ main: com.songoda.epicenchants.EpicEnchants
|
||||||
softdepend:
|
softdepend:
|
||||||
- PlaceholderAPI
|
- PlaceholderAPI
|
||||||
- PlayerPoints
|
- PlayerPoints
|
||||||
- UltimateBottles
|
|
||||||
- Vault
|
- Vault
|
||||||
|
|
||||||
author: Craftaro
|
author: Craftaro
|
||||||
|
|
Loading…
Reference in New Issue