1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed GuideHandler Runnables

This commit is contained in:
TheBusyBiscuit 2017-01-18 15:51:14 +01:00
parent f313014c70
commit c5f0770827
2 changed files with 7 additions and 7 deletions

View File

@ -282,7 +282,7 @@ public class SlimefunGuide {
URID last = getLastEntry(p, false);
if (URID.decode(last) instanceof Category) openCategory(p, (Category) URID.decode(last), true, 1, experimental);
else if (URID.decode(last) instanceof SlimefunItem) displayItem(p, ((SlimefunItem) URID.decode(last)).getItem(), false, experimental, 0);
else if (URID.decode(last) instanceof GuideHandler) ((GuideHandler) URID.decode(last)).run(p, true);
else if (URID.decode(last) instanceof GuideHandler) ((GuideHandler) URID.decode(last)).run(p, true, experimental);
else displayItem(p, (ItemStack) URID.decode(last), false, experimental, 0);
}
}
@ -322,7 +322,7 @@ public class SlimefunGuide {
@Override
public void run(Player p) {
handler.run(p, survival);
handler.run(p, survival, experimental);
}
});
}
@ -397,7 +397,7 @@ public class SlimefunGuide {
@Override
public void run(Player p) {
handler.run(p, survival);
handler.run(p, survival, experimental);
}
});
}
@ -1022,7 +1022,7 @@ public class SlimefunGuide {
URID last = getLastEntry(p, true);
if (URID.decode(last) instanceof Category) openCategory(p, (Category) URID.decode(last), true, 1, experimental);
else if (URID.decode(last) instanceof SlimefunItem) displayItem(p, ((SlimefunItem) URID.decode(last)).getItem(), false, experimental, 0);
else if (URID.decode(last) instanceof GuideHandler) ((GuideHandler) URID.decode(last)).run(p, true);
else if (URID.decode(last) instanceof GuideHandler) ((GuideHandler) URID.decode(last)).run(p, true, experimental);
else displayItem(p, (ItemStack) URID.decode(last), false, experimental, 0);
}
return false;

View File

@ -28,12 +28,12 @@ public abstract class GuideHandler {
public abstract int next(Player p, int index, ChestMenu menu);
public PlayerRunnable getRunnable(boolean survival) {
public PlayerRunnable getRunnable(boolean book) {
return this.getRunnable();
}
public void run(Player p, boolean survival) {
this.getRunnable(survival).run(p);
public void run(Player p, boolean survival, boolean book) {
this.getRunnable(book).run(p);
if (survival && this.trackHistory()) {
SlimefunGuide.addToHistory(p, getURID());