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:
parent
27cf6147a6
commit
2e0ea7a596
@ -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() {
|
||||
|
@ -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)
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user