Fix issue when loading plugin while server is up (e.g. using PlugMan). Release 1.0.2

This commit is contained in:
Simon Chuu 2018-08-11 03:57:16 -04:00
parent 54c03e40db
commit d4d7cfeb32
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ plugins {
}
group 'com.simonorj.mc.phantomsmp'
version '1.0.1'
version '1.0.2'
sourceCompatibility = 1.8

View File

@ -38,6 +38,10 @@ public class PhantomSMP extends JavaPlugin {
this.phantomPlayerMap = new HashMap<>();
this.removeTargetingRested = getConfig().getBoolean("remove-targeting-rested", true);
for (Player p : getServer().getOnlinePlayers()) {
this.playerPhantomMap.put(p, new LinkedHashSet<>());
}
// Initiate map
for (World w : getServer().getWorlds()) {
if (w.getEnvironment() != World.Environment.NORMAL)