mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 16:29:39 +00:00
SyncController OVERHAUL PHASE #2:
- Created SyncRegistry and SyncHandler - Extracted all 14 SyncType family handling to their own SyncHandler - Rewritten SyncController to accomodate the new framework
This commit is contained in:
1 parent
48281c8d34
commit
6d0655ad7d
34 files changed
+2743
-746
No files matched your search
@@ -32,6 +32,7 @@ import kamkeel.npcs.controllers.data.ability.type.AbilitySlam;
|
||||
import kamkeel.npcs.controllers.data.ability.type.AbilityTeleport;
|
||||
import kamkeel.npcs.controllers.data.ability.type.AbilityTrap;
|
||||
import kamkeel.npcs.controllers.data.ability.type.AbilityVortex;
|
||||
import kamkeel.npcs.network.enums.SyncType;
|
||||
import kamkeel.npcs.controllers.data.ability.type.energy.AbilityBeam;
|
||||
import kamkeel.npcs.controllers.data.ability.type.energy.AbilityDisc;
|
||||
import kamkeel.npcs.controllers.data.ability.type.energy.AbilityDome;
|
||||
@@ -393,7 +394,7 @@ public class AbilityController implements IAbilityHandler {
|
||||
customAbilitiesById.put(uuid, ability);
|
||||
customAbilityRevision++;
|
||||
LogWriter.script("Saved custom ability: " + name + " [" + uuid + "]");
|
||||
SyncController.syncAllCustomAbilities();
|
||||
SyncController.syncAll(SyncType.CUSTOM_ABILITY);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error saving custom ability: " + name, e);
|
||||
@@ -478,7 +479,7 @@ public class AbilityController implements IAbilityHandler {
|
||||
|
||||
customAbilityRevision++;
|
||||
LogWriter.script("Deleted custom ability: " + name);
|
||||
SyncController.syncAllCustomAbilities();
|
||||
SyncController.syncAll(SyncType.CUSTOM_ABILITY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -765,7 +766,7 @@ public class AbilityController implements IAbilityHandler {
|
||||
chainedAbilitiesById.put(uuid, chain);
|
||||
chainedAbilityRevision++;
|
||||
LogWriter.script("Saved chained ability: " + name + " [" + uuid + "]");
|
||||
SyncController.syncAllChainedAbilities();
|
||||
SyncController.syncAll(SyncType.CHAINED_ABILITY);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error saving chained ability: " + name, e);
|
||||
@@ -845,7 +846,7 @@ public class AbilityController implements IAbilityHandler {
|
||||
|
||||
chainedAbilityRevision++;
|
||||
LogWriter.script("Deleted chained ability: " + name);
|
||||
SyncController.syncAllChainedAbilities();
|
||||
SyncController.syncAll(SyncType.CHAINED_ABILITY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user