Correction de bug : On pouvait sortir d'AFK en se faisant pousser par un piston
This commit is contained in:
parent
80e3b63a31
commit
f7fd007602
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<jardesc>
|
<jardesc>
|
||||||
<jar path="PandacraftUtils/jar_export/PandacraftUtils-2.2.jar"/>
|
<jar path="PandacraftUtils/jar_export/PandacraftUtils-2.2.1.jar"/>
|
||||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/PandacraftUtils/make_jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
<options buildIfNeeded="true" compress="true" descriptionLocation="/PandacraftUtils/make_jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||||
<selectedProjects/>
|
<selectedProjects/>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: PandacraftUtils
|
name: PandacraftUtils
|
||||||
main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils
|
main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils
|
||||||
version: 2.2
|
version: 2.2.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -264,7 +264,12 @@ public class CommandAfk extends BukkitRunnable implements CommandExecutor, Liste
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getAfkPlayer(event.getPlayer()).isDoingAction();
|
// on sors de l'AFK que si la téléportation ne se fait qu'à partir de 2 blocs d'espace
|
||||||
|
// pour éviter qu'on sorte de l'AFK en se faisait pousser par des pistons
|
||||||
|
// car un piston "téléporte" le joueur (techniquement parlant, dans le jeu) à 1 bloc de distance
|
||||||
|
if (event.getFrom().getWorld() != event.getTo().getWorld()
|
||||||
|
|| event.getFrom().distanceSquared(event.getTo()) > 2*2)
|
||||||
|
getAfkPlayer(event.getPlayer()).isDoingAction();
|
||||||
}
|
}
|
||||||
catch (NullPointerException e) { }
|
catch (NullPointerException e) { }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user