Fix LoginLocationFixListener
This commit is contained in:
parent
8a5dfc8e6a
commit
f1d6df9a17
12
pom.xml
12
pom.xml
@ -346,6 +346,10 @@
|
|||||||
<pattern>com.google.gson</pattern>
|
<pattern>com.google.gson</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<!-- <relocation>-->
|
||||||
|
<!-- <pattern>com.cryptomorin.xseries</pattern>-->
|
||||||
|
<!-- <shadedPattern>fr.xephi.authme.libs.com.cryptomorin.xseries</shadedPattern>-->
|
||||||
|
<!-- </relocation>-->
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@ -865,6 +869,14 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- <!– XSeries –>-->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>com.github.cryptomorin</groupId>-->
|
||||||
|
<!-- <artifactId>XSeries</artifactId>-->
|
||||||
|
<!-- <version>9.8.0</version>-->
|
||||||
|
<!-- <scope>compile</scope>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- zPermissions plugin -->
|
<!-- zPermissions plugin -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.tyrannyofheaven.bukkit</groupId>
|
<groupId>org.tyrannyofheaven.bukkit</groupId>
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public class LoginLocationFixListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Location JoinLocation = player.getLocation().getBlock().getLocation().add(0.5, 0.1, 0.5);
|
Location JoinLocation = player.getLocation();
|
||||||
if (isFixPortalStuck) {
|
if (isFixPortalStuck) {
|
||||||
if (!JoinLocation.getBlock().getType().equals(materialPortal) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(materialPortal)) {
|
if (!JoinLocation.getBlock().getType().equals(materialPortal) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(materialPortal)) {
|
||||||
return;
|
return;
|
||||||
@ -73,7 +73,8 @@ public class LoginLocationFixListener implements Listener {
|
|||||||
JoinBlock.breakNaturally();
|
JoinBlock.breakNaturally();
|
||||||
}
|
}
|
||||||
messages.send(player, MessageKey.LOCATION_FIX_PORTAL);
|
messages.send(player, MessageKey.LOCATION_FIX_PORTAL);
|
||||||
} else if (isFixGroundStuck) {
|
}
|
||||||
|
if (isFixGroundStuck) {
|
||||||
Material UpType = JoinLocation.getBlock().getRelative(BlockFace.UP).getType();
|
Material UpType = JoinLocation.getBlock().getRelative(BlockFace.UP).getType();
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
int MaxHeight = world.getMaxHeight();
|
int MaxHeight = world.getMaxHeight();
|
||||||
@ -108,5 +109,6 @@ public class LoginLocationFixListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user