On Interlude and HighFive they are hardcoded on server core.
this is the best way, adding them and using them through scripts causes more errors
What you say is incorrect.
FYI the datapack TvT is better than any hardcoded event.
Datapack scripts are more than enough to make anything.
If the following code, copy pasted in main classes like Creature and PlayerInstance seems fine to you, I have no words...
if ((TvT.isStarted() && _inEventTvT && targetPlayer._inEventTvT) || (DM.hasStarted() && _inEventDM && targetPlayer._inEventDM) || (CTF.isStarted() && _inEventCTF && targetPlayer._inEventCTF) || (VIP._started && _inEventVIP && targetPlayer._inEventVIP))
There should be only two booleans stated in PlayerInstance.
If player has registered for an event, or if player is in an active event, with whatever checks is needed for them.
The above code is junk. There is no debate to it.
Variables needed for events should be saved in the events themselves.
The following junk is stored in PlayerInstance, with various methods checking for them.
public boolean _isVIP = false;
public boolean _inEventVIP = false;
public boolean _isNotVIP = false;
public boolean _isTheVIP = false;
public int _originalNameColourVIP;
public int _originalKarmaVIP;
public int eventX;
public int eventY;
public int eventZ;
public int eventKarma;
public int eventPvpKills;
public int eventPkKills;
public String eventTitle;
public List<String> kills = new LinkedList<>();
public boolean eventSitForced = false;
public boolean atEvent = false;
public String _teamNameTvT;
public String _originalTitleTvT;
public int _originalNameColorTvT = 0;
public int _countTvTkills;
public int _countTvTdies;
public int _originalKarmaTvT;
public boolean _inEventTvT = false;
public String _teamNameCTF;
public String _teamNameHaveFlagCTF;
public String _originalTitleCTF;
public int _originalNameColorCTF = 0;
public int _originalKarmaCTF;
public int _countCTFflags;
public boolean _inEventCTF = false;
public boolean _haveFlagCTF = false;
public Future<?> _posCheckerCTF = null;
public String _originalTitleDM;
public int _originalNameColorDM = 0;
public int _countDMkills;
public int _originalKarmaDM;
public boolean _inEventDM = false;
public int _originalNameColor;
public int _countKills;
public int _originalKarma;
public int _eventKills;
public boolean _inEvent = false;
private int quakeSystem = 0;