Skip to content

Commit

Permalink
Fixed performance issue related to joinQuit event
Browse files Browse the repository at this point in the history
  • Loading branch information
7sat committed Feb 8, 2023
1 parent 0618122 commit 85a1748
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.sat7</groupId>
<artifactId>DynamicShop</artifactId>
<version>3.7.0</version>
<version>3.7.1</version>
<packaging>jar</packaging>

<name>DynamicShop</name>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/me/sat7/dynamicshop/DynamicShop.java
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ public List<String> onTabComplete(CommandSender sender, Command cmd, String comm
@Override
public void onDisable()
{
DynamicShop.ccUser.save();

Bukkit.getScheduler().cancelTasks(this);
console.sendMessage(Constants.DYNAMIC_SHOP_PREFIX + " Disabled");
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/sat7/dynamicshop/commands/CommandHelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public void RunCMD(String[] args, CommandSender sender)
player.sendMessage(DynamicShop.dsPrefix(player) + "켜짐");
DynamicShop.userTempData.put(uuid, "");
DynamicShop.ccUser.get().set(player.getUniqueId() + ".cmdHelp", true);
DynamicShop.ccUser.save();
//DynamicShop.ccUser.save();
} else if (args[1].equalsIgnoreCase("off"))
{
player.sendMessage(DynamicShop.dsPrefix(player) + "꺼짐");
DynamicShop.userTempData.put(uuid, "");
DynamicShop.ccUser.get().set(player.getUniqueId() + ".cmdHelp", false);
DynamicShop.ccUser.save();
//DynamicShop.ccUser.save();
} else
{
player.sendMessage(DynamicShop.dsPrefix(player) + t(player, "ERR.WRONG_USAGE"));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/sat7/dynamicshop/events/JoinQuit.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void onPlayerJoin(PlayerJoinEvent e)
DynamicShop.userInteractItem.put(player.getUniqueId(), "");
DynamicShop.ccUser.get().set(player.getUniqueId() + ".lastJoin", System.currentTimeMillis());
DynamicShop.ccUser.get().addDefault(player.getUniqueId() + ".cmdHelp", true);
DynamicShop.ccUser.save();
//DynamicShop.ccUser.save();

boolean isSnapshot = DynamicShop.yourVersion.contains("snapshot");
if (DynamicShop.updateAvailable || isSnapshot)
Expand Down

0 comments on commit 85a1748

Please sign in to comment.