1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-31 21:37:57 +01:00

check if same job by its name, just to be on safe side

if multiserver enabled, load player data after some delay.
This commit is contained in:
Zrips 2016-10-03 13:17:41 +03:00
parent 27cf6147a6
commit 2e0ea7a596
3 changed files with 13 additions and 4 deletions

View File

@ -123,7 +123,7 @@ public class Job {
}
public boolean isSame(Job job) {
return this.equals(job);
return this.getName().equalsIgnoreCase(job.getName());
}
public double getPointBoost() {

View File

@ -156,12 +156,21 @@ public class JobsListener implements Listener {
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event) {
public void onPlayerJoin(final PlayerJoinEvent event) {
// make sure plugin is enabled
if (!plugin.isEnabled())
return;
Jobs.getPlayerManager().playerJoin(event.getPlayer());
if (!Jobs.getGCManager().MultiServerCompatability())
Jobs.getPlayerManager().playerJoin(event.getPlayer());
else
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@Override
public void run() {
Jobs.getPlayerManager().playerJoin(event.getPlayer());
}
}, 10L);
}
// @EventHandler(priority = EventPriority.MONITOR)

View File

@ -1,7 +1,7 @@
name: Jobs
description: Jobs Plugin for the BukkitAPI
main: com.gamingmesh.jobs.Jobs
version: 3.6.1
version: 3.6.2
author: phrstbrn
depend: [Vault]
softdepend: [MythicMobs, McMMO]