Skip to content

Conversation

@95CivicSi
Copy link

This update will bring FantasyProtection up to speed with PocketMine-MP 3.0.0-ALPHA11. No backwards compatible changes were made, There were changes to clean the code up and fix some existing errors Examples would be:

  • Added Checks to commands to see if Command Sender is a Player before using player methods.
  • Fix undefined variables errors.
  • Change method for acquiring the Prefix used in EventListener(). This change is a demonstration of a potential performance update.

When using a config file for things similar to this, it is useful to avoid accessing the hard drive (by accessing the config file) whenever possible. Every function call and file access is increased amount of time which can cause lag. Commonly used variables should be stored in memory and updated only as needed.

… namespace with the current item, it is not necessary to import that class or item.
…mber of time that the configuration file is accessed for any variable, performance is increased. Also updated some methods to ensure that Player methods are only called on Players.
…o ensure Command Sender is a Player before calling Player methods during commands. Fixed undefined variables $level on 251 and 284.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant