Use new-style runTask methods

This commit is contained in:
riking
2014-06-13 23:19:23 -07:00
parent 4c14e6b72a
commit c1b5780d77
4 changed files with 15 additions and 14 deletions

View File

@@ -387,11 +387,11 @@ public class DisguiseUtilities {
}
// Add null so that if this is called again. I already know I'm doing something about it
gameProfiles.put(playerName, null);
Bukkit.getScheduler().scheduleAsyncDelayedTask(libsDisguises, new Runnable() {
Bukkit.getScheduler().runTaskAsynchronously(libsDisguises, new Runnable() {
public void run() {
try {
final WrappedGameProfile gameProfile = lookupGameProfile(playerName);
Bukkit.getScheduler().scheduleSyncDelayedTask(libsDisguises, new Runnable() {
Bukkit.getScheduler().runTask(libsDisguises, new Runnable() {
public void run() {
if (gameProfiles.containsKey(playerName) && gameProfiles.get(playerName) == null) {
gameProfiles.put(playerName, gameProfile);
@@ -647,7 +647,7 @@ public class DisguiseUtilities {
// If it is, then this method will be run again in one tick. Which is when it should be constructed.
// Else its going to run in a infinite loop hue hue hue..
// At least until this disguise is discarded
Bukkit.getScheduler().scheduleSyncDelayedTask(libsDisguises, new Runnable() {
Bukkit.getScheduler().runTask(libsDisguises, new Runnable() {
public void run() {
if (DisguiseAPI.getDisguise(player, player) == disguise) {
sendSelfDisguise(player, disguise);

View File

@@ -909,7 +909,7 @@ public class PacketsManager {
if (clickedItem != null && clickedItem.getType() != Material.AIR) {
// Rather than predict the clients actions
// Lets just update the entire inventory..
Bukkit.getScheduler().scheduleSyncDelayedTask(libsDisguises, new Runnable() {
Bukkit.getScheduler().runTask(libsDisguises, new Runnable() {
public void run() {
event.getPlayer().updateInventory();
}