mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
!cleanups
This commit is contained in:
parent
75210f0557
commit
06ecbb46bb
BIN
lib/MMOLib.jar
BIN
lib/MMOLib.jar
Binary file not shown.
8
pom.xml
8
pom.xml
@ -71,16 +71,16 @@
|
||||
|
||||
<!-- MMOs -->
|
||||
<dependency>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<groupId>net.mmogroup</groupId>
|
||||
<artifactId>MMOLib</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<version>1.0.9</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/MMOLib.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<artifactId>mmocore</artifactId>
|
||||
<version>1.4.2</version>
|
||||
<version>1.4.12</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/MMOCore.jar</systemPath>
|
||||
</dependency>
|
||||
@ -94,7 +94,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.12-R1-1.16-R2</version>
|
||||
<version>amalgam</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/spigot.jar</systemPath>
|
||||
</dependency>
|
||||
|
@ -74,7 +74,6 @@ public class MMOUtils {
|
||||
}
|
||||
|
||||
public static LivingEntity getDamager(EntityDamageByEntityEvent event) {
|
||||
|
||||
/*
|
||||
* check direct damager
|
||||
*/
|
||||
|
@ -1,7 +1,5 @@
|
||||
package net.Indyuce.mmoitems.stat;
|
||||
|
||||
import com.google.common.base.Enums;
|
||||
import com.google.common.base.Optional;
|
||||
import net.Indyuce.mmoitems.ItemStats;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.MMOUtils;
|
||||
@ -18,12 +16,14 @@ import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.ClickEvent.Action;
|
||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||
import net.mmogroup.mmolib.api.util.AltChar;
|
||||
import net.mmogroup.mmolib.api.util.EnumUtils;
|
||||
import net.mmogroup.mmolib.version.VersionMaterial;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class MaterialStat extends ItemStat {
|
||||
public MaterialStat() {
|
||||
@ -44,9 +44,7 @@ public class MaterialStat extends ItemStat {
|
||||
|
||||
@Override
|
||||
public void whenInput(EditionInventory inv, String message, Object... info) {
|
||||
//TODO: Make own getIfPresent for enums using Java optionals
|
||||
@SuppressWarnings({"Guava", "UnstableApiUsage"})
|
||||
Optional<Material> material = Enums.getIfPresent(Material.class,
|
||||
Optional<Material> material = EnumUtils.getIfPresent(Material.class,
|
||||
message.toUpperCase().replace("-", "_").replace(" ", "_"));
|
||||
if (material.isPresent()) {
|
||||
inv.getEditedSection().set("material", material.get().name());
|
||||
|
Loading…
Reference in New Issue
Block a user