Skip to content

Commit

Permalink
Fixed subcraft rotate not turning after failed detection
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikh1996 committed Nov 6, 2020
1 parent 502f6d4 commit aab151d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Movecraft/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</properties>

<!--<version>7.0.0_beta_6</version>-->
<version>7.0.0_for_1.8.8-1.16.2_beta_34</version>
<version>7.0.0_for_1.8.8-1.16.2_beta_35</version>

<repositories>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ public void run() {
startPointMap.put(subCraft, startPoint);
Bukkit.getServer().getPluginManager().callEvent(new CraftPilotEvent(subCraft, CraftPilotEvent.Reason.SUB_CRAFT));
event.setCancelled(true);
new BukkitRunnable() {
/**
* When an object implementing interface <code>Runnable</code> is used
* to create a thread, starting the thread causes the object's
* <code>run</code> method to be called in that separately executing
* thread.
* <p>
* The general contract of the method <code>run</code> is that it may
* take any action whatsoever.
*
* @see Thread#run()
*/
@Override
public void run() {
rotatingCrafts.remove(startPoint);
}
}.runTaskLaterAsynchronously(Movecraft.getInstance(), 5);
}

@EventHandler
Expand Down

0 comments on commit aab151d

Please sign in to comment.