From ee813bde38e960f02a20eddddbe3e2b8d8fdef7f Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sun, 23 Oct 2022 10:31:52 +0200 Subject: [PATCH 1/5] Changed def exp split range --- MMOCore-Dist/src/main/resources/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMOCore-Dist/src/main/resources/config.yml b/MMOCore-Dist/src/main/resources/config.yml index a6d6024c..e48ed383 100644 --- a/MMOCore-Dist/src/main/resources/config.yml +++ b/MMOCore-Dist/src/main/resources/config.yml @@ -152,7 +152,7 @@ party: # Exp won't be split if players are too far apart. # # Set to 0 to disable - max-exp-split-range: 50 + max-exp-split-range: 48 # When enabled, being in a party also splits profession exp profession-exp-split: false From 25d4639636100b1e10612e63a5eaa74b64c6687e Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 29 Oct 2022 01:18:56 +0200 Subject: [PATCH 2/5] Fixed doc --- .../Indyuce/mmocore/experience/Booster.java | 186 +++++++++--------- 1 file changed, 90 insertions(+), 96 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/Booster.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/Booster.java index 28f609a5..8daa0bd1 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/Booster.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/Booster.java @@ -6,118 +6,112 @@ import java.util.Objects; import java.util.UUID; public class Booster { - private final UUID uuid = UUID.randomUUID(); - private final long date = System.currentTimeMillis(); - private final Profession profession; - private final double extra; - private final String author; + private final UUID uuid = UUID.randomUUID(); + private final long date = System.currentTimeMillis(); + private final Profession profession; + private final double extra; + private final String author; - /** - * Length is not final because boosters can stacks. This allows to reduce - * the amount of boosters displayed in the main player menu - * - * See {@link BoosterManager#register(Booster)} - */ - private long length; + /** + * Length is not final because boosters can stacks. This allows to reduce + * the amount of boosters displayed in the main player menu + *

+ * See {@link BoosterManager#register(Booster)} + */ + private long length; - /** - * @param extra - * 1 for +100% experience, 3 for 300% etc. - * @param length - * Booster length in milliseconds - */ - public Booster(double extra, long length) { - this(null, null, extra, length); - } + /** + * @param extra 1 for +100% experience, 3 for 300% etc. + * @param length Booster length in seconds + */ + public Booster(double extra, long length) { + this(null, null, extra, length); + } - /** - * Main class experience booster - * - * @param author The booster creator - * @param extra 1 for +100% experience, 3 for 300% etc. - * @param length Booster length in milliseconds - */ - public Booster(String author, double extra, long length) { - this(author, null, extra, length); - } + /** + * Main class experience booster + * + * @param author The booster creator + * @param extra 1 for +100% experience, 3 for 300% etc. + * @param length Booster length in seconds + */ + public Booster(String author, double extra, long length) { + this(author, null, extra, length); + } - /** - * Profession experience booster - * - * @param author - * The booster creator - * @param profession - * Either null for main level boosters or a specific profession - * @param extra - * 1 for +100% experience, 3 for 300% etc. - * @param length - * Booster length in milliseconds - */ - public Booster(String author, Profession profession, double extra, long length) { - this.author = author; - this.length = length * 1000; - this.profession = profession; - this.extra = extra; - } + /** + * Profession experience booster + * + * @param author The booster creator + * @param profession Either null for main level boosters or a specific profession + * @param extra 1 for +100% experience, 3 for 300% etc. + * @param length Booster length in seconds + */ + public Booster(String author, Profession profession, double extra, long length) { + this.author = author; + this.length = length * 1000; + this.profession = profession; + this.extra = extra; + } - public UUID getUniqueId() { - return uuid; - } + public UUID getUniqueId() { + return uuid; + } - public double getExtra() { - return extra; - } + public double getExtra() { + return extra; + } - public boolean hasAuthor() { - return author != null; - } + public boolean hasAuthor() { + return author != null; + } - public String getAuthor() { - return author; - } + public String getAuthor() { + return author; + } - public long getCreationDate() { - return date; - } + public long getCreationDate() { + return date; + } - public boolean hasProfession() { - return profession != null; - } + public boolean hasProfession() { + return profession != null; + } - public Profession getProfession() { - return profession; - } + public Profession getProfession() { + return profession; + } - public boolean isTimedOut() { - return date + length < System.currentTimeMillis(); - } + public boolean isTimedOut() { + return date + length < System.currentTimeMillis(); + } - public long getLeft() { - return Math.max(0, date + length - System.currentTimeMillis()); - } + public long getLeft() { + return Math.max(0, date + length - System.currentTimeMillis()); + } - public long getLength() { - return length; - } + public long getLength() { + return length; + } - public void addLength(long length) { - this.length += length; - } + public void addLength(long length) { + this.length += length; + } - public boolean canStackWith(Booster booster) { - return extra == booster.extra && Objects.equals(profession, booster.profession); - } + public boolean canStackWith(Booster booster) { + return extra == booster.extra && Objects.equals(profession, booster.profession); + } - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Booster booster = (Booster) o; - return Objects.equals(uuid, booster.uuid); - } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Booster booster = (Booster) o; + return Objects.equals(uuid, booster.uuid); + } - @Override - public int hashCode() { - return Objects.hash(uuid); - } + @Override + public int hashCode() { + return Objects.hash(uuid); + } } From 7618c1f1f4a512a45b164cddec4229ab6841a00e Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 29 Oct 2022 01:20:33 +0200 Subject: [PATCH 3/5] Fixed gitignore --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e769c860..acac8c56 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,9 @@ target/ .project MMOCore.eml MMOCore.iml -dependency-reduced-pom.xml \ No newline at end of file +dependency-reduced-pom.xml +/MMOCore-API/MMOCore-API.iml +/MMOCore-API/.flattened-pom.xml +/MMOCore-Dist/.flattened-pom.xml +/MMOCore-Dist/MMOCore-Dist.iml +/MMOCore-Dist/MMOCore-Bukkit.iml From 391825908e85872dc41669b444b51c534ed2fe52 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 29 Oct 2022 01:40:44 +0200 Subject: [PATCH 4/5] Fixing gitignore --- MMOCore-API/MMOCore-API.iml | 103 ++++++++++++++++++++++++++++++++++ MMOCore-Dist/MMOCore-Dist.iml | 17 ++++++ 2 files changed, 120 insertions(+) create mode 100644 MMOCore-API/MMOCore-API.iml create mode 100644 MMOCore-Dist/MMOCore-Dist.iml diff --git a/MMOCore-API/MMOCore-API.iml b/MMOCore-API/MMOCore-API.iml new file mode 100644 index 00000000..c48dc058 --- /dev/null +++ b/MMOCore-API/MMOCore-API.iml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MMOCore-Dist/MMOCore-Dist.iml b/MMOCore-Dist/MMOCore-Dist.iml new file mode 100644 index 00000000..90d27efd --- /dev/null +++ b/MMOCore-Dist/MMOCore-Dist.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file From da777d5ac5c0ccd11202111341a1fe9340c17c16 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 29 Oct 2022 01:45:56 +0200 Subject: [PATCH 5/5] Removed unversioned files --- .gitignore | 7 ++----- .gitlab-ci.yml | 11 ----------- MMOCore-API/MMOCore-API.iml | 17 ----------------- MMOCore-Dist/MMOCore-Dist.iml | 16 ---------------- 4 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 MMOCore-API/MMOCore-API.iml delete mode 100644 MMOCore-Dist/MMOCore-Dist.iml diff --git a/.gitignore b/.gitignore index acac8c56..0a7558e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,12 @@ bin/ -.m2/ target/ .settings/ .idea/ .classpath .project +dependency-reduced-pom.xml +.flattened-pom.xml MMOCore.eml MMOCore.iml -dependency-reduced-pom.xml /MMOCore-API/MMOCore-API.iml -/MMOCore-API/.flattened-pom.xml -/MMOCore-Dist/.flattened-pom.xml /MMOCore-Dist/MMOCore-Dist.iml -/MMOCore-Dist/MMOCore-Bukkit.iml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 12d7438c..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,11 +0,0 @@ -image: maven:3-openjdk-16-slim - -build: - stage: build - script: - - mvn clean package - -deploy: - stage: deploy - script: - - mvn deploy diff --git a/MMOCore-API/MMOCore-API.iml b/MMOCore-API/MMOCore-API.iml deleted file mode 100644 index 1b429aca..00000000 --- a/MMOCore-API/MMOCore-API.iml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - SPIGOT - MCP - BUKKIT - - - - - - - \ No newline at end of file diff --git a/MMOCore-Dist/MMOCore-Dist.iml b/MMOCore-Dist/MMOCore-Dist.iml deleted file mode 100644 index d35a0362..00000000 --- a/MMOCore-Dist/MMOCore-Dist.iml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - SPIGOT - MCP - - - - - - - \ No newline at end of file