mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Clone map to avoid issues
This commit is contained in:
parent
5612becd6f
commit
e9187ad9fa
@ -9,5 +9,6 @@
|
||||
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/MythicMobs-2.1.8.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Residence/lib/iConomy7.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Residence/lib/worldedit-bukkit-6.1.1-SNAPSHOT-dist.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/craftconomy3-3.3.1-20160221.070622-13.jar"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
||||
|
@ -472,7 +472,9 @@ public class Jobs extends JavaPlugin {
|
||||
int y = 0;
|
||||
int total = Jobs.getPlayerManager().getMapSize();
|
||||
long time = System.currentTimeMillis();
|
||||
Iterator<Entry<UUID, PlayerInfo>> it = Jobs.getPlayerManager().getPlayersInfoUUIDMap().entrySet().iterator();
|
||||
// Cloning to avoid issues
|
||||
HashMap<UUID, PlayerInfo> temp = new HashMap<UUID, PlayerInfo>(Jobs.getPlayerManager().getPlayersInfoUUIDMap());
|
||||
Iterator<Entry<UUID, PlayerInfo>> it = temp.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Entry<UUID, PlayerInfo> one = it.next();
|
||||
if (!running)
|
||||
|
1
com/gamingmesh/jobs/economy/.gitignore
vendored
1
com/gamingmesh/jobs/economy/.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/IConomy6Adapter.class
|
||||
/IConomy7Adapter.class
|
||||
/IConomyAdapter.class
|
||||
/CraftConomy3Adapter.class
|
||||
|
@ -21,50 +21,50 @@ package com.gamingmesh.jobs.economy;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
|
||||
public class VaultEconomy implements Economy {
|
||||
private net.milkbowl.vault.economy.Economy vault;
|
||||
private net.milkbowl.vault.economy.Economy vault;
|
||||
|
||||
public VaultEconomy(net.milkbowl.vault.economy.Economy vault) {
|
||||
this.vault = vault;
|
||||
}
|
||||
public VaultEconomy(net.milkbowl.vault.economy.Economy vault) {
|
||||
this.vault = vault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean depositPlayer(OfflinePlayer offlinePlayer, double money) {
|
||||
return vault.depositPlayer(offlinePlayer, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean depositPlayer(String PlayerName, double money) {
|
||||
return vault.depositPlayer(PlayerName, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withdrawPlayer(OfflinePlayer offlinePlayer, double money) {
|
||||
return vault.withdrawPlayer(offlinePlayer, money).transactionSuccess();
|
||||
}
|
||||
@Override
|
||||
public boolean depositPlayer(OfflinePlayer offlinePlayer, double money) {
|
||||
return vault.depositPlayer(offlinePlayer, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean depositPlayer(String PlayerName, double money) {
|
||||
return vault.depositPlayer(PlayerName, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withdrawPlayer(OfflinePlayer offlinePlayer, double money) {
|
||||
return vault.withdrawPlayer(offlinePlayer, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean withdrawPlayer(String PlayerName, double money) {
|
||||
return vault.withdrawPlayer(PlayerName, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMoney(OfflinePlayer offlinePlayer, double money) {
|
||||
if (offlinePlayer.getName() == null)
|
||||
return false;
|
||||
return vault.has(offlinePlayer, money);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean hasMoney(String PlayerName, double money) {
|
||||
return vault.has(PlayerName, money);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(double money) {
|
||||
return vault.format(money);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean withdrawPlayer(String PlayerName, double money) {
|
||||
return vault.withdrawPlayer(PlayerName, money).transactionSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMoney(OfflinePlayer offlinePlayer, double money) {
|
||||
if (offlinePlayer.getName() == null)
|
||||
return false;
|
||||
return vault.has(offlinePlayer, money);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean hasMoney(String PlayerName, double money) {
|
||||
return vault.has(PlayerName, money);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(double money) {
|
||||
return vault.format(money);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user