From 3b4b5bcd8e22dd5407edb2fd51d33d850d172e83 Mon Sep 17 00:00:00 2001 From: md678685 Date: Fri, 1 Mar 2019 11:51:15 +0000 Subject: [PATCH] Remove Lombok Remove the (already minimal) usage of Lombok. This will ease development for people who don't already have their IDE set up for Lombok support. It's also totally unnecessary - it took less than 60 seconds to generate the code needed to replace Lombok annotations in Jails and Spawns. --- .../earth2me/essentials/settings/Jails.java | 30 +++++++++++++++++-- .../earth2me/essentials/settings/Spawns.java | 30 +++++++++++++++++-- pom.xml | 6 ---- 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/settings/Jails.java b/Essentials/src/com/earth2me/essentials/settings/Jails.java index 311a75f82..63082cb5a 100644 --- a/Essentials/src/com/earth2me/essentials/settings/Jails.java +++ b/Essentials/src/com/earth2me/essentials/settings/Jails.java @@ -2,15 +2,39 @@ package com.earth2me.essentials.settings; import com.earth2me.essentials.storage.MapValueType; import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; import org.bukkit.Location; import java.util.HashMap; import java.util.Map; +import java.util.Objects; -@Data @EqualsAndHashCode(callSuper = false) public class Jails implements StorageObject { +public class Jails implements StorageObject { @MapValueType(Location.class) private Map jails = new HashMap(); + + public Map getJails() { + return jails; + } + + public void setJails(Map jails) { + this.jails = jails; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Jails jails1 = (Jails) o; + return Objects.equals(jails, jails1.jails); + } + + @Override + public int hashCode() { + return Objects.hash(jails); + } } diff --git a/Essentials/src/com/earth2me/essentials/settings/Spawns.java b/Essentials/src/com/earth2me/essentials/settings/Spawns.java index cac982c48..5df62e8cf 100644 --- a/Essentials/src/com/earth2me/essentials/settings/Spawns.java +++ b/Essentials/src/com/earth2me/essentials/settings/Spawns.java @@ -2,14 +2,38 @@ package com.earth2me.essentials.settings; import com.earth2me.essentials.storage.MapValueType; import com.earth2me.essentials.storage.StorageObject; -import lombok.Data; -import lombok.EqualsAndHashCode; import org.bukkit.Location; import java.util.HashMap; import java.util.Map; +import java.util.Objects; -@Data @EqualsAndHashCode(callSuper = false) public class Spawns implements StorageObject { +public class Spawns implements StorageObject { @MapValueType(Location.class) private Map spawns = new HashMap<>(); + + public Map getSpawns() { + return spawns; + } + + public void setSpawns(Map spawns) { + this.spawns = spawns; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Spawns spawns1 = (Spawns) o; + return Objects.equals(spawns, spawns1.spawns); + } + + @Override + public int hashCode() { + return Objects.hash(spawns); + } } diff --git a/pom.xml b/pom.xml index 1c5c219a2..9090c4c91 100644 --- a/pom.xml +++ b/pom.xml @@ -67,12 +67,6 @@ 4.12 test - - org.projectlombok - lombok - 1.18.4 - provided -