Use new-style runTask methods
This commit is contained in:
@@ -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);
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user