From c096e72dff52ddd03e27f679edf68f0f0dc5c3b9 Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 3 Feb 2021 15:27:13 -0600 Subject: [PATCH 1/8] !This build enables with Mythiclib and mmoitems --- src/main/resources/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f9a2404a..da4f0be8 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ main: net.Indyuce.mmocore.MMOCore author: Indyuce description: ${project.description} loadbefore: [MMOItems] -depend: [MMOLib] +depend: [MythicLib] softdepend: [Vault,MythicMobs,PlaceholderAPI,Residence] api-version: 1.13 commands: From 94968c4739254b7bd5f4be2bc5237a47a90087b7 Mon Sep 17 00:00:00 2001 From: RicardormDev Date: Sat, 6 Feb 2021 15:43:15 -0600 Subject: [PATCH 2/8] !Fixed: Player data wasn't loading. Added: Event when called when a player used an attribute. --- .../api/event/PlayerAttributeUseEvent.java | 22 ++++++++ .../mmocore/api/player/PlayerData.java | 14 ++--- .../comp/placeholder/RPGPlaceholders.java | 4 +- .../Indyuce/mmocore/gui/AttributeView.java | 6 +++ .../mmocore/listener/PlayerListener.java | 19 ++++--- .../manager/data/PlayerDataManager.java | 54 +++++++++---------- src/main/resources/plugin.yml | 2 +- 7 files changed, 74 insertions(+), 47 deletions(-) create mode 100644 src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java diff --git a/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java b/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java new file mode 100644 index 00000000..eb9e63b4 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java @@ -0,0 +1,22 @@ +package net.Indyuce.mmocore.api.event; + +import net.Indyuce.mmocore.api.player.PlayerData; +import org.bukkit.event.HandlerList; + +public class PlayerAttributeUseEvent extends PlayerDataEvent{ + private static final HandlerList handlers = new HandlerList(); + + public PlayerAttributeUseEvent(PlayerData playerData) { + super(playerData); + } + + + @Override + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } +} diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 26eb1b86..6dbeff78 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -92,16 +92,11 @@ public class PlayerData extends OfflinePlayerData { this.questData = new PlayerQuests(this); } - /* - * easily solves some issues where other plugins use PlayerData.get - */ - public static final PlayerData NOT_LOADED = new PlayerData(); - @Deprecated private PlayerData() { super(UUID.randomUUID()); - mmoData = new MMOPlayerData(null, null); + mmoData = new MMOPlayerData(); playerStats = new PlayerStats(this); questData = new PlayerQuests(this, null); } @@ -447,7 +442,7 @@ public class PlayerData extends OfflinePlayerData { * * @param value Experience to give the player * @param source How the player earned experience - * @param loc Location used to display the hologram. If it's null, no + * @param hologramLocation Location used to display the hologram. If it's null, no * hologram will be displayed */ public void giveExperience(int value, EXPSource source, @Nullable Location hologramLocation) { @@ -789,6 +784,11 @@ public class PlayerData extends OfflinePlayerData { return cast; } + @Override + public int hashCode() { + return mmoData.hashCode(); + } + @Override public boolean equals(Object obj) { return obj instanceof PlayerData && ((PlayerData) obj).getUniqueId().equals(getUniqueId()); diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 25177eaf..5ece02bb 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -13,8 +13,6 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; import org.bukkit.attribute.Attribute; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; public class RPGPlaceholders extends PlaceholderExpansion { @@ -45,7 +43,7 @@ public class RPGPlaceholders extends PlaceholderExpansion { @SuppressWarnings("DuplicateExpressions") @Override - public String onRequest(@Nullable OfflinePlayer player, @NotNull String identifier) { + public String onRequest(OfflinePlayer player, String identifier) { PlayerData playerData = PlayerData.get(player); if (identifier.equals("mana_icon")) diff --git a/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java b/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java index 07fcca19..1943a3bb 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java +++ b/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java @@ -1,5 +1,7 @@ package net.Indyuce.mmocore.gui; +import net.Indyuce.mmocore.api.event.PlayerAttributeUseEvent; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryClickEvent; @@ -127,6 +129,10 @@ public class AttributeView extends EditableInventory { playerData.giveAttributePoints(-1); MMOCore.plugin.configManager.getSimpleMessage("attribute-level-up", "attribute", attribute.getName(), "level", "" + ins.getBase()).send(player); MMOCore.plugin.soundManager.play(getPlayer(), SoundManager.SoundEvent.LEVEL_ATTRIBUTE); + + PlayerAttributeUseEvent playerAttributeUseEvent = new PlayerAttributeUseEvent(playerData); + Bukkit.getServer().getPluginManager().callEvent(playerAttributeUseEvent); + open(); } } diff --git a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java index b3bf01f5..b76518fb 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java @@ -12,6 +12,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; @@ -20,15 +21,21 @@ import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; import net.Indyuce.mmocore.gui.api.PluginInventory; +import org.bukkit.scheduler.BukkitRunnable; public class PlayerListener implements Listener { - /* - * initialize player data - */ - @EventHandler(priority = EventPriority.LOW) - public void a(PlayerJoinEvent event) { - MMOCore.plugin.dataProvider.getDataManager().setup(event.getPlayer().getUniqueId()); + /* + We load our player data. + */ + @EventHandler(priority = EventPriority.NORMAL) + public void playerLoadingEvent(PlayerJoinEvent e) { + new BukkitRunnable() { + @Override + public void run() { + MMOCore.plugin.dataProvider.getDataManager().setup(e.getPlayer().getUniqueId()); + } + }.runTaskAsynchronously(MMOCore.plugin); } /* diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java index b1d895bc..656b0448 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java @@ -1,9 +1,6 @@ package net.Indyuce.mmocore.manager.data; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import java.util.*; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; @@ -14,9 +11,11 @@ import net.Indyuce.mmocore.api.event.PlayerDataLoadEvent; import net.Indyuce.mmocore.api.player.OfflinePlayerData; import net.Indyuce.mmocore.api.player.PlayerData; import io.lumine.mythic.lib.api.player.MMOPlayerData; +import org.bukkit.scheduler.BukkitRunnable; public abstract class PlayerDataManager { - private final static Map data = new HashMap<>(); + private final static Map data = Collections.synchronizedMap(new HashMap<>()); + private DefaultPlayerData defaultData = new DefaultPlayerData(1, 0, 0, 0, 0); public PlayerData get(OfflinePlayer player) { @@ -33,34 +32,29 @@ public abstract class PlayerDataManager { public abstract OfflinePlayerData getOffline(UUID uuid); - public PlayerData setup(UUID uuid) { - /* - * Setup playerData based on loadData method to support both MySQL and - * YAML data storage - */ - PlayerData playerData = data.get(uuid); - if (playerData == null) { - playerData = data.put(uuid, new PlayerData(MMOPlayerData.get(uuid))); + public PlayerData setup(UUID uniqueId) { + return data.compute(uniqueId, (uuid, searchData) -> { + if (searchData == null) { + PlayerData playerData = new PlayerData(MMOPlayerData.get(uniqueId)); - /* - * Loads player data and ONLY THEN refresh the player statistics and - * calls the load event on the MAIN thread - */ - Bukkit.getScheduler().runTaskAsynchronously(MMOCore.plugin, () -> { - PlayerData loaded = PlayerData.get(uuid); - if (!loaded.isOnline()) - return; - loadData(loaded); - Bukkit.getScheduler().runTask(MMOCore.plugin, () -> { - if (loaded.isOnline()) - Bukkit.getPluginManager().callEvent(new PlayerDataLoadEvent(loaded)); - }); - loaded.getStats().updateStats(); - }); - } - return playerData; + loadData(playerData); + playerData.getStats().updateStats(); + + // We call the player data load event. TODO: Convert this event to async. + new BukkitRunnable() { + @Override + public void run() { + Bukkit.getPluginManager().callEvent(new PlayerDataLoadEvent(playerData)); + } + }.runTask(MMOCore.plugin); + + return playerData; + } else return searchData; + + }); } + public DefaultPlayerData getDefaultData() { return defaultData; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f9a2404a..da4f0be8 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ main: net.Indyuce.mmocore.MMOCore author: Indyuce description: ${project.description} loadbefore: [MMOItems] -depend: [MMOLib] +depend: [MythicLib] softdepend: [Vault,MythicMobs,PlaceholderAPI,Residence] api-version: 1.13 commands: From 7326cb482ee3bf211abf10325b20b11055a17e11 Mon Sep 17 00:00:00 2001 From: RicardormDev Date: Sat, 6 Feb 2021 15:45:48 -0600 Subject: [PATCH 3/8] Revert "!Fixed: Player data wasn't loading. Added: Event when called when a player used an attribute." This reverts commit 94968c4739254b7bd5f4be2bc5237a47a90087b7. --- .../api/event/PlayerAttributeUseEvent.java | 22 -------- .../mmocore/api/player/PlayerData.java | 14 ++--- .../comp/placeholder/RPGPlaceholders.java | 4 +- .../Indyuce/mmocore/gui/AttributeView.java | 6 --- .../mmocore/listener/PlayerListener.java | 19 +++---- .../manager/data/PlayerDataManager.java | 54 ++++++++++--------- src/main/resources/plugin.yml | 2 +- 7 files changed, 47 insertions(+), 74 deletions(-) delete mode 100644 src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java diff --git a/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java b/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java deleted file mode 100644 index eb9e63b4..00000000 --- a/src/main/java/net/Indyuce/mmocore/api/event/PlayerAttributeUseEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.Indyuce.mmocore.api.event; - -import net.Indyuce.mmocore.api.player.PlayerData; -import org.bukkit.event.HandlerList; - -public class PlayerAttributeUseEvent extends PlayerDataEvent{ - private static final HandlerList handlers = new HandlerList(); - - public PlayerAttributeUseEvent(PlayerData playerData) { - super(playerData); - } - - - @Override - public HandlerList getHandlers() { - return handlers; - } - - public static HandlerList getHandlerList() { - return handlers; - } -} diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 6dbeff78..26eb1b86 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -92,11 +92,16 @@ public class PlayerData extends OfflinePlayerData { this.questData = new PlayerQuests(this); } + /* + * easily solves some issues where other plugins use PlayerData.get + */ + public static final PlayerData NOT_LOADED = new PlayerData(); + @Deprecated private PlayerData() { super(UUID.randomUUID()); - mmoData = new MMOPlayerData(); + mmoData = new MMOPlayerData(null, null); playerStats = new PlayerStats(this); questData = new PlayerQuests(this, null); } @@ -442,7 +447,7 @@ public class PlayerData extends OfflinePlayerData { * * @param value Experience to give the player * @param source How the player earned experience - * @param hologramLocation Location used to display the hologram. If it's null, no + * @param loc Location used to display the hologram. If it's null, no * hologram will be displayed */ public void giveExperience(int value, EXPSource source, @Nullable Location hologramLocation) { @@ -784,11 +789,6 @@ public class PlayerData extends OfflinePlayerData { return cast; } - @Override - public int hashCode() { - return mmoData.hashCode(); - } - @Override public boolean equals(Object obj) { return obj instanceof PlayerData && ((PlayerData) obj).getUniqueId().equals(getUniqueId()); diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 5ece02bb..25177eaf 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -13,6 +13,8 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; import org.bukkit.attribute.Attribute; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class RPGPlaceholders extends PlaceholderExpansion { @@ -43,7 +45,7 @@ public class RPGPlaceholders extends PlaceholderExpansion { @SuppressWarnings("DuplicateExpressions") @Override - public String onRequest(OfflinePlayer player, String identifier) { + public String onRequest(@Nullable OfflinePlayer player, @NotNull String identifier) { PlayerData playerData = PlayerData.get(player); if (identifier.equals("mana_icon")) diff --git a/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java b/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java index 1943a3bb..07fcca19 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java +++ b/src/main/java/net/Indyuce/mmocore/gui/AttributeView.java @@ -1,7 +1,5 @@ package net.Indyuce.mmocore.gui; -import net.Indyuce.mmocore.api.event.PlayerAttributeUseEvent; -import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryClickEvent; @@ -129,10 +127,6 @@ public class AttributeView extends EditableInventory { playerData.giveAttributePoints(-1); MMOCore.plugin.configManager.getSimpleMessage("attribute-level-up", "attribute", attribute.getName(), "level", "" + ins.getBase()).send(player); MMOCore.plugin.soundManager.play(getPlayer(), SoundManager.SoundEvent.LEVEL_ATTRIBUTE); - - PlayerAttributeUseEvent playerAttributeUseEvent = new PlayerAttributeUseEvent(playerData); - Bukkit.getServer().getPluginManager().callEvent(playerAttributeUseEvent); - open(); } } diff --git a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java index b76518fb..b3bf01f5 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java @@ -12,7 +12,6 @@ import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; -import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; @@ -21,21 +20,15 @@ import net.Indyuce.mmocore.api.event.PlayerRegenResourceEvent; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; import net.Indyuce.mmocore.gui.api.PluginInventory; -import org.bukkit.scheduler.BukkitRunnable; public class PlayerListener implements Listener { - /* - We load our player data. - */ - @EventHandler(priority = EventPriority.NORMAL) - public void playerLoadingEvent(PlayerJoinEvent e) { - new BukkitRunnable() { - @Override - public void run() { - MMOCore.plugin.dataProvider.getDataManager().setup(e.getPlayer().getUniqueId()); - } - }.runTaskAsynchronously(MMOCore.plugin); + /* + * initialize player data + */ + @EventHandler(priority = EventPriority.LOW) + public void a(PlayerJoinEvent event) { + MMOCore.plugin.dataProvider.getDataManager().setup(event.getPlayer().getUniqueId()); } /* diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java index 656b0448..b1d895bc 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/PlayerDataManager.java @@ -1,6 +1,9 @@ package net.Indyuce.mmocore.manager.data; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; @@ -11,11 +14,9 @@ import net.Indyuce.mmocore.api.event.PlayerDataLoadEvent; import net.Indyuce.mmocore.api.player.OfflinePlayerData; import net.Indyuce.mmocore.api.player.PlayerData; import io.lumine.mythic.lib.api.player.MMOPlayerData; -import org.bukkit.scheduler.BukkitRunnable; public abstract class PlayerDataManager { - private final static Map data = Collections.synchronizedMap(new HashMap<>()); - + private final static Map data = new HashMap<>(); private DefaultPlayerData defaultData = new DefaultPlayerData(1, 0, 0, 0, 0); public PlayerData get(OfflinePlayer player) { @@ -32,29 +33,34 @@ public abstract class PlayerDataManager { public abstract OfflinePlayerData getOffline(UUID uuid); - public PlayerData setup(UUID uniqueId) { - return data.compute(uniqueId, (uuid, searchData) -> { - if (searchData == null) { - PlayerData playerData = new PlayerData(MMOPlayerData.get(uniqueId)); + public PlayerData setup(UUID uuid) { + /* + * Setup playerData based on loadData method to support both MySQL and + * YAML data storage + */ + PlayerData playerData = data.get(uuid); + if (playerData == null) { + playerData = data.put(uuid, new PlayerData(MMOPlayerData.get(uuid))); - loadData(playerData); - playerData.getStats().updateStats(); - - // We call the player data load event. TODO: Convert this event to async. - new BukkitRunnable() { - @Override - public void run() { - Bukkit.getPluginManager().callEvent(new PlayerDataLoadEvent(playerData)); - } - }.runTask(MMOCore.plugin); - - return playerData; - } else return searchData; - - }); + /* + * Loads player data and ONLY THEN refresh the player statistics and + * calls the load event on the MAIN thread + */ + Bukkit.getScheduler().runTaskAsynchronously(MMOCore.plugin, () -> { + PlayerData loaded = PlayerData.get(uuid); + if (!loaded.isOnline()) + return; + loadData(loaded); + Bukkit.getScheduler().runTask(MMOCore.plugin, () -> { + if (loaded.isOnline()) + Bukkit.getPluginManager().callEvent(new PlayerDataLoadEvent(loaded)); + }); + loaded.getStats().updateStats(); + }); + } + return playerData; } - public DefaultPlayerData getDefaultData() { return defaultData; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index da4f0be8..f9a2404a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ main: net.Indyuce.mmocore.MMOCore author: Indyuce description: ${project.description} loadbefore: [MMOItems] -depend: [MythicLib] +depend: [MMOLib] softdepend: [Vault,MythicMobs,PlaceholderAPI,Residence] api-version: 1.13 commands: From 79bbf8beaccd67a80750fb1c920855d287bdc617 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 7 Feb 2021 02:27:04 -0600 Subject: [PATCH 4/8] MMOCore 1.7 Dev Build, Massive changes. NOTE: THIS DEPENDS ON MYTHICLIB NOW, FIND THIS ON SPIGOT, IT NO LONGER USES MMOLIB. IT IS THE SAME RESOURCE ON SPIGOT THOUGH. Will post changelog on spigot after this is verified as stable. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d2ed83a9..81691d4b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 net.Indyuce MMOCore - 1.6.2 + 1.7.0 MMOCore Offer your players a brand new RPG experience. From 193d12f7b4884343bb46818761b231e747154951 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 7 Feb 2021 02:29:25 -0600 Subject: [PATCH 5/8] MMOCore 1.7 Dev Build, Massive changes. NOTE: THIS DEPENDS ON MYTHICLIB NOW, FIND THIS ON SPIGOT, IT NO LONGER USES MMOLIB. IT IS THE SAME RESOURCE ON SPIGOT THOUGH. Will post changelog on spigot after this is verified as stable. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 81691d4b..b75add4f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ MMOCore 1.7.0 MMOCore - Offer your players a brand new RPG experience. + Offer your players a brand new RPG experience! false From d3f44e24a2d84304a316a16f6e22687e61ad02f0 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 7 Feb 2021 02:37:48 -0600 Subject: [PATCH 6/8] Build please --- pom.xml | 2 +- src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b75add4f..b3b1c581 100644 --- a/pom.xml +++ b/pom.xml @@ -122,7 +122,7 @@ io.lumine MythicLib - 0.0.1-SNAPSHOT + 1.0.0 provided diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 26eb1b86..0e8350b2 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -101,7 +101,7 @@ public class PlayerData extends OfflinePlayerData { private PlayerData() { super(UUID.randomUUID()); - mmoData = new MMOPlayerData(null, null); + mmoData = new MMOPlayerData(null); playerStats = new PlayerStats(this); questData = new PlayerQuests(this, null); } @@ -447,7 +447,7 @@ public class PlayerData extends OfflinePlayerData { * * @param value Experience to give the player * @param source How the player earned experience - * @param loc Location used to display the hologram. If it's null, no + * @param hologramLocation Location used to display the hologram. If it's null, no * hologram will be displayed */ public void giveExperience(int value, EXPSource source, @Nullable Location hologramLocation) { From 2d73f38fcac4329e23b36f88c60df15f78b44737 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 7 Feb 2021 02:43:49 -0600 Subject: [PATCH 7/8] Build please --- src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 0e8350b2..4085075f 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -130,7 +130,7 @@ public class PlayerData extends OfflinePlayerData { + getProfess().getId() + " while refreshing player data."); } catch (NullPointerException npe2) { MMOCore.log(Level.SEVERE, - "[Userdata] Could not find unidentified skill in class " + getProfess().getId() + " while refreshing player data."); + "[Userdata] Could not find unidentified skill in the class " + getProfess().getId() + " while refreshing player data."); } } } From 8405e82eb1db3635af90779050a04e088d6480fe Mon Sep 17 00:00:00 2001 From: Ashijin Date: Mon, 8 Feb 2021 02:44:42 -0700 Subject: [PATCH 8/8] removed Carson --- src/main/java/net/Indyuce/mmocore/MMOCore.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index a609e226..62a4f3cc 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -2,6 +2,7 @@ package net.Indyuce.mmocore; import io.lumine.mythic.lib.comp.Metrics; import io.lumine.mythic.lib.version.SpigotPlugin; +import io.lumine.mythic.utils.plugin.LuminePlugin; import net.Indyuce.mmocore.api.ConfigFile; import net.Indyuce.mmocore.api.PlayerActionBar; import net.Indyuce.mmocore.api.loot.LootChest; @@ -62,7 +63,7 @@ import java.lang.reflect.Field; import java.util.HashSet; import java.util.logging.Level; -public class MMOCore extends JavaPlugin { +public class MMOCore extends LuminePlugin { public static MMOCore plugin; public ConfigManager configManager; @@ -103,7 +104,7 @@ public class MMOCore extends JavaPlugin { public boolean shouldDebugSQL = false; - public void onLoad() { + public void load() { plugin = this; /* @@ -127,7 +128,7 @@ public class MMOCore extends JavaPlugin { if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) flagPlugin = new WorldGuardFlags(); } - public void onEnable() { + public void enable() { new SpigotPlugin(70575, this).checkForUpdate(); new Metrics(this); saveDefaultConfig(); @@ -329,7 +330,7 @@ public class MMOCore extends JavaPlugin { } } - public void onDisable() { + public void disable() { for (PlayerData data : PlayerData.getAll()) { if(!data.isFullyLoaded()) return; data.getQuestData().resetBossBar();