Closed Soldier233 closed 4 years ago
Maybe you should add a cooldown when switching servers? The problem could be caused by the latency of writing to the database.
Even adding a repeatable task will sometimes cause data loss if there is a delay.
yes. But I found plugin Mypet solved this problem by adding a delay in fetching data from db.
btw. Is there a api to get the level of player's weapon and armour. I want to enhance the monster of the players nearby according to their levels.
yes. But I found plugin Mypet solved this problem by adding a delay in fetching data from db.
What do you mean by that? Do you mean adding a delay when a player joins the server?
use runTaskLater(instance,20l)
to get the data from mysql when joining the server
Before reporting an issue make sure you are running the latest build of the plugin and checked for duplicate issues!
What behaviour is observed:
the plugin using mysql mode will lose data when changing server
Steps to reproduce:
Connect two servers of EE to one mysql table change server, data lose sometime.
Plugin list:
[23:25:49 INFO]: Plugins (32): AdvancedCleaner, Citizens, CMI, CommandNPC, Craftconomy3, DiamondLand, DiamondWorld, EnchantmentsEnhance, LockettePro, mcMMO, MiaoBoard, Multiverse-Core, Multiverse-NetherPortals, MyPet, PermissionsEx, PlaceholderAPI, PlayerPoints, PlayerSQL, PlugMan, ProtocolLib, QuickShop, RandomParachute, Residence, SimpleORM, SQLibrary, TAB, TrChat, TrMenu, Vault, ViaVersion, VipSystem, WorldEdit
Environment description
Enchantments Enhance build number:
Error Log:
None
Advice to fix
Add a interval before getting data from the server when joining the server.