3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Reduce chance of quick move task while disabling

Closes #2226
Dieser Commit ist enthalten in:
KennyTV 2020-12-08 12:42:13 +01:00
Ursprung d75420a35b
Commit 7858b998ca
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -51,10 +51,8 @@ public class BukkitInventoryQuickMoveProvider extends InventoryQuickMoveProvider
return false; return false;
} }
if (windowId == 0) { if (windowId == 0) {
/** // windowId is always 0 for player inventory.
* windowId is always 0 for player inventory. // This has almost definitely something to do with the offhand slot.
* This has almost definitely something to do with the offhand slot.
*/
if (slotId >= 36 && slotId <= 44) { if (slotId >= 36 && slotId <= 44) {
int protocolId = ProtocolRegistry.SERVER_PROTOCOL; int protocolId = ProtocolRegistry.SERVER_PROTOCOL;
// this seems to be working just fine. // this seems to be working just fine.
@ -73,7 +71,7 @@ public class BukkitInventoryQuickMoveProvider extends InventoryQuickMoveProvider
} }
// http://wiki.vg/index.php?title=Protocol&oldid=13223#Click_Window // http://wiki.vg/index.php?title=Protocol&oldid=13223#Click_Window
updateTask.addItem(windowId, slotId, actionId); updateTask.addItem(windowId, slotId, actionId);
if (!registered) { if (!registered && Via.getPlatform().isPluginEnabled()) {
Via.getPlatform().runSync(updateTask, 5L); Via.getPlatform().runSync(updateTask, 5L);
} }
return true; return true;