mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-02-14 19:01:39 +01:00
Merge branch 'development'
This commit is contained in:
commit
3db8f0f507
27
pom.xml
27
pom.xml
@ -2,24 +2,28 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicHoppers</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>4.7.1</version>
|
||||
<version>4.7.2</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicHoppers-${project.version}</finalName>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||
<artifactId>replacer</artifactId>
|
||||
<version>1.5.3</version>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
@ -28,6 +32,7 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
<file>${project.build.directory}/classes/plugin.yml</file>
|
||||
<replacements>
|
||||
@ -38,10 +43,12 @@
|
||||
</replacements>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.3.0-SNAPSHOT</version>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>shaded</id>
|
||||
@ -49,14 +56,17 @@
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
|
||||
<configuration>
|
||||
<shadedArtifactAttached>false</shadedArtifactAttached>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>com.songoda:SongodaCore</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
@ -67,6 +77,7 @@
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>com.songoda.core</pattern>
|
||||
@ -79,26 +90,31 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>apache.snapshots</id>
|
||||
<url>https://repository.apache.org/snapshots/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<url>https://repo.songoda.com/repository/public/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>spigotmc-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
@ -106,42 +122,49 @@
|
||||
<version>1.18-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>skyblock</artifactId>
|
||||
<version>2.3.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore</artifactId>
|
||||
<version>2.6.5</version>
|
||||
<version>2.6.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicFarming</artifactId>
|
||||
<version>3.0.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.brcdev-minecraft</groupId>
|
||||
<artifactId>shopgui-api</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateStacker</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bgsoftware</groupId>
|
||||
<artifactId>wildstacker</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.DeadSilenceIV</groupId>
|
||||
<artifactId>AdvancedChestsAPI</artifactId>
|
||||
|
@ -23,7 +23,6 @@ import com.songoda.epichoppers.commands.CommandSettings;
|
||||
import com.songoda.epichoppers.containers.ContainerManager;
|
||||
import com.songoda.epichoppers.database.DataManager;
|
||||
import com.songoda.epichoppers.database.migrations._1_InitialMigration;
|
||||
import com.songoda.epichoppers.hopper.teleport.TeleportHandler;
|
||||
import com.songoda.epichoppers.hopper.HopperManager;
|
||||
import com.songoda.epichoppers.hopper.levels.Level;
|
||||
import com.songoda.epichoppers.hopper.levels.LevelManager;
|
||||
@ -34,6 +33,7 @@ import com.songoda.epichoppers.hopper.levels.modules.ModuleAutoSmelter;
|
||||
import com.songoda.epichoppers.hopper.levels.modules.ModuleBlockBreak;
|
||||
import com.songoda.epichoppers.hopper.levels.modules.ModuleMobHopper;
|
||||
import com.songoda.epichoppers.hopper.levels.modules.ModuleSuction;
|
||||
import com.songoda.epichoppers.hopper.teleport.TeleportHandler;
|
||||
import com.songoda.epichoppers.listeners.BlockListeners;
|
||||
import com.songoda.epichoppers.listeners.EntityListeners;
|
||||
import com.songoda.epichoppers.listeners.HopperListeners;
|
||||
@ -46,7 +46,6 @@ import com.songoda.epichoppers.utils.Methods;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.permission.BasicPermission;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -235,18 +234,20 @@ public class EpicHoppers extends SongodaPlugin {
|
||||
|
||||
private void saveModules() {
|
||||
if (levelManager != null) {
|
||||
for (Level level : levelManager.getLevels().values())
|
||||
for (Module module : level.getRegisteredModules())
|
||||
for (Level level : levelManager.getLevels().values()) {
|
||||
for (Module module : level.getRegisteredModules()) {
|
||||
module.saveDataToFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack newHopperItem(Level level) {
|
||||
ItemStack item = new ItemStack(Material.HOPPER, 1);
|
||||
ItemStack item = new ItemStack(CompatibleMaterial.HOPPER.getMaterial());
|
||||
ItemMeta itemmeta = item.getItemMeta();
|
||||
itemmeta.setDisplayName(TextUtils.formatText(Methods.formatName(level.getLevel())));
|
||||
String line = getLocale().getMessage("general.nametag.lore").getMessage();
|
||||
if (!line.equals("")) {
|
||||
if (!line.isEmpty()) {
|
||||
itemmeta.setLore(Arrays.asList(line.split("\n")));
|
||||
}
|
||||
item.setItemMeta(itemmeta);
|
||||
|
@ -101,7 +101,7 @@ public class GUIAutoSellFilter extends CustomizableGui {
|
||||
}
|
||||
|
||||
// Info item
|
||||
indicatorItem = new ItemStack(Material.PAPER, 1);
|
||||
indicatorItem = new ItemStack(CompatibleMaterial.PAPER.getMaterial());
|
||||
indicatorMeta = indicatorItem.getItemMeta();
|
||||
|
||||
indicatorMeta.setDisplayName(plugin.getLocale().getMessage("interface.autosell-filter.infotitle").getMessage());
|
||||
@ -135,7 +135,7 @@ public class GUIAutoSellFilter extends CustomizableGui {
|
||||
for (int slot : whiteListSlots) {
|
||||
if (slot != i) continue;
|
||||
|
||||
if (items[i] != null && items[i].getType() != Material.AIR) {
|
||||
if (items[i] != null && !items[i].getType().isAir()) {
|
||||
ItemStack item = items[i];
|
||||
if (item.getAmount() != 1) {
|
||||
item.setAmount(item.getAmount() - 1);
|
||||
@ -150,7 +150,7 @@ public class GUIAutoSellFilter extends CustomizableGui {
|
||||
for (int slot : blackListSlots) {
|
||||
if (slot != i) continue;
|
||||
|
||||
if (items[i] != null && items[i].getType() != Material.AIR) {
|
||||
if (items[i] != null && !items[i].getType().isAir()) {
|
||||
ItemStack item = items[i];
|
||||
if (item.getAmount() != 1) {
|
||||
item.setAmount(item.getAmount() - 1);
|
||||
|
@ -99,7 +99,7 @@ public class GUIFilter extends CustomizableGui {
|
||||
num++;
|
||||
}
|
||||
|
||||
it = new ItemStack(Material.BARRIER);
|
||||
it = new ItemStack(CompatibleMaterial.BARRIER.getMaterial());
|
||||
itm = it.getItemMeta();
|
||||
itm.setDisplayName(plugin.getLocale().getMessage("interface.filter.void").getMessage());
|
||||
it.setItemMeta(itm);
|
||||
@ -117,7 +117,7 @@ public class GUIFilter extends CustomizableGui {
|
||||
num++;
|
||||
}
|
||||
|
||||
ItemStack itemInfo = new ItemStack(Material.PAPER, 1);
|
||||
ItemStack itemInfo = new ItemStack(CompatibleMaterial.PAPER.getMaterial());
|
||||
ItemMeta itemmetaInfo = itemInfo.getItemMeta();
|
||||
itemmetaInfo.setDisplayName(plugin.getLocale().getMessage("interface.filter.infotitle").getMessage());
|
||||
ArrayList<String> loreInfo = new ArrayList<>();
|
||||
@ -131,7 +131,7 @@ public class GUIFilter extends CustomizableGui {
|
||||
setItem("info", 16, itemInfo);
|
||||
|
||||
|
||||
ItemStack hook = new ItemStack(Material.TRIPWIRE_HOOK, 1);
|
||||
ItemStack hook = new ItemStack(CompatibleMaterial.TRIPWIRE_HOOK.getMaterial());
|
||||
ItemMeta hookmeta = hook.getItemMeta();
|
||||
hookmeta.setDisplayName(plugin.getLocale().getMessage("interface.hopper.rejectsync").getMessage());
|
||||
ArrayList<String> lorehook = new ArrayList<>();
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: EpicHoppers
|
||||
description: EpicHoppers
|
||||
main: com.songoda.epichoppers.EpicHoppers
|
||||
softdepend: [FabledSkyBlock, LiquidTanks, UltimateStacker, WildStacker, Reserve, Towny, RedProtect, Kingdoms, PlotsSquared, GriefPrevention, USkyBlock, ASkyBlock, WorldGuard, Factions, Vault, EpicFarming, AdvancedChests]
|
||||
softdepend: [ FabledSkyBlock, LiquidTanks, UltimateStacker, WildStacker, Reserve, Towny, RedProtect, Kingdoms, PlotsSquared, GriefPrevention, USkyBlock, ASkyBlock, WorldGuard, Factions, Vault, EpicFarming, AdvancedChests ]
|
||||
version: maven-version-number
|
||||
author: Songoda
|
||||
api-version: 1.13
|
||||
@ -9,5 +9,5 @@ commands:
|
||||
eh:
|
||||
description: View information on this plugin.
|
||||
default: true
|
||||
aliases: [EpicHoppers]
|
||||
aliases: [ EpicHoppers ]
|
||||
usage: /eh
|
Loading…
Reference in New Issue
Block a user