mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-03-11 14:09:55 +01:00
Resynchronize custom event
This commit is contained in:
parent
1c2b585a6f
commit
2350a9e6d2
2
pom.xml
2
pom.xml
@ -28,7 +28,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<version>2.7.15</version>
|
<version>2.7.15b1</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
|
@ -155,58 +155,58 @@ public class Management {
|
|||||||
utils.packCoords(getAuth.getQuitLocX(), getAuth.getQuitLocY(), getAuth.getQuitLocZ(), player);
|
utils.packCoords(getAuth.getQuitLocX(), getAuth.getQuitLocY(), getAuth.getQuitLocZ(), player);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
|
||||||
pm.callEvent(tpEvent);
|
|
||||||
if(!tpEvent.isCancelled()) {
|
|
||||||
final Location fLoc = tpEvent.getTo();
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
||||||
fLoc.getChunk().load();
|
pm.callEvent(tpEvent);
|
||||||
}
|
Location fLoc = tpEvent.getTo();
|
||||||
player.teleport(fLoc);
|
if (!tpEvent.isCancelled()) {
|
||||||
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
|
fLoc.getChunk().load();
|
||||||
|
}
|
||||||
|
player.teleport(fLoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
|
else if (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
|
||||||
SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnLoc, true);
|
final Location spawnL = spawnLoc;
|
||||||
pm.callEvent(tpEvent);
|
|
||||||
if(!tpEvent.isCancelled()) {
|
|
||||||
final Location fLoc = tpEvent.getTo();
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnL, true);
|
||||||
fLoc.getChunk().load();
|
pm.callEvent(tpEvent);
|
||||||
}
|
if(!tpEvent.isCancelled()) {
|
||||||
player.teleport(fLoc);
|
Location fLoc = tpEvent.getTo();
|
||||||
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
|
fLoc.getChunk().load();
|
||||||
|
}
|
||||||
|
player.teleport(fLoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ((Settings.isSaveQuitLocationEnabled) && (getAuth.getQuitLocY() != 0))
|
else if ((Settings.isSaveQuitLocationEnabled) && (getAuth.getQuitLocY() != 0))
|
||||||
{
|
{
|
||||||
utils.packCoords(getAuth.getQuitLocX(), getAuth.getQuitLocY(), getAuth.getQuitLocZ(), player);
|
utils.packCoords(getAuth.getQuitLocX(), getAuth.getQuitLocY(), getAuth.getQuitLocZ(), player);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
pm.callEvent(tpEvent);
|
@Override
|
||||||
if(!tpEvent.isCancelled()) {
|
public void run() {
|
||||||
final Location fLoc = tpEvent.getTo();
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
pm.callEvent(tpEvent);
|
||||||
@Override
|
Location fLoc = tpEvent.getTo();
|
||||||
public void run() {
|
if (!tpEvent.isCancelled()) {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
fLoc.getChunk().load();
|
fLoc.getChunk().load();
|
||||||
}
|
}
|
||||||
player.teleport(fLoc);
|
player.teleport(fLoc);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
@ -315,90 +315,90 @@ public class Management {
|
|||||||
if ((Settings.isTeleportToSpawnEnabled) && (!Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())))
|
if ((Settings.isTeleportToSpawnEnabled) && (!Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())))
|
||||||
{
|
{
|
||||||
if ((Settings.isSaveQuitLocationEnabled) && (database.getAuth(name).getQuitLocY() != 0)) {
|
if ((Settings.isSaveQuitLocationEnabled) && (database.getAuth(name).getQuitLocY() != 0)) {
|
||||||
Location quitLoc = new Location(player.getWorld(), database.getAuth(name).getQuitLocX() + 0.5D, database.getAuth(name).getQuitLocY() + 0.5D, database.getAuth(name).getQuitLocZ() + 0.5D);
|
final Location quitLoc = new Location(player.getWorld(), database.getAuth(name).getQuitLocX() + 0.5D, database.getAuth(name).getQuitLocY() + 0.5D, database.getAuth(name).getQuitLocZ() + 0.5D);
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, quitLoc);
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
pm.callEvent(tpEvent);
|
@Override
|
||||||
if(!tpEvent.isCancelled()) {
|
public void run() {
|
||||||
final Location fLoc = tpEvent.getTo();
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, quitLoc);
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
pm.callEvent(tpEvent);
|
||||||
@Override
|
Location fLoc = tpEvent.getTo();
|
||||||
public void run() {
|
if (!tpEvent.isCancelled()) {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
fLoc.getChunk().load();
|
fLoc.getChunk().load();
|
||||||
}
|
}
|
||||||
player.teleport(fLoc);
|
player.teleport(fLoc);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
pm.callEvent(tpEvent);
|
@Override
|
||||||
if(!tpEvent.isCancelled()) {
|
public void run() {
|
||||||
final Location fLoc = tpEvent.getTo();
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
pm.callEvent(tpEvent);
|
||||||
@Override
|
Location fLoc = tpEvent.getTo();
|
||||||
public void run() {
|
if (!tpEvent.isCancelled()) {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
fLoc.getChunk().load();
|
fLoc.getChunk().load();
|
||||||
}
|
}
|
||||||
player.teleport(fLoc);
|
player.teleport(fLoc);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
|
else if (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
|
||||||
|
final Location spawnL = spawnLoc;
|
||||||
SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnLoc, true);
|
|
||||||
pm.callEvent(tpEvent);
|
|
||||||
if(!tpEvent.isCancelled()) {
|
|
||||||
final Location fLoc = tpEvent.getTo();
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
|
||||||
fLoc.getChunk().load();
|
|
||||||
}
|
|
||||||
player.teleport(fLoc);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((Settings.isSaveQuitLocationEnabled) && (database.getAuth(name).getQuitLocY() != 0)) {
|
|
||||||
Location quitLoc = new Location(player.getWorld(), database.getAuth(name).getQuitLocX() + 0.5D, database.getAuth(name).getQuitLocY() + 0.5D, database.getAuth(name).getQuitLocZ() + 0.5D);
|
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, quitLoc);
|
|
||||||
pm.callEvent(tpEvent);
|
|
||||||
if(!tpEvent.isCancelled()) {
|
|
||||||
final Location fLoc = tpEvent.getTo();
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnL, true);
|
||||||
fLoc.getChunk().load();
|
pm.callEvent(tpEvent);
|
||||||
}
|
if(!tpEvent.isCancelled()) {
|
||||||
player.teleport(fLoc);
|
Location fLoc = tpEvent.getTo();
|
||||||
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
|
fLoc.getChunk().load();
|
||||||
|
}
|
||||||
|
player.teleport(fLoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if ((Settings.isSaveQuitLocationEnabled) && (database.getAuth(name).getQuitLocY() != 0)) {
|
||||||
|
final Location quitLoc = new Location(player.getWorld(), database.getAuth(name).getQuitLocX() + 0.5D, database.getAuth(name).getQuitLocY() + 0.5D, database.getAuth(name).getQuitLocZ() + 0.5D);
|
||||||
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, quitLoc);
|
||||||
|
pm.callEvent(tpEvent);
|
||||||
|
Location fLoc = tpEvent.getTo();
|
||||||
|
if (!tpEvent.isCancelled()) {
|
||||||
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
|
fLoc.getChunk().load();
|
||||||
|
}
|
||||||
|
player.teleport(fLoc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
pm.callEvent(tpEvent);
|
@Override
|
||||||
if(!tpEvent.isCancelled()) {
|
public void run() {
|
||||||
final Location fLoc = tpEvent.getTo();
|
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, limbo.getLoc());
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
pm.callEvent(tpEvent);
|
||||||
@Override
|
Location fLoc = tpEvent.getTo();
|
||||||
public void run() {
|
if (!tpEvent.isCancelled()) {
|
||||||
if (!fLoc.getChunk().isLoaded()) {
|
if (!fLoc.getChunk().isLoaded()) {
|
||||||
fLoc.getChunk().load();
|
fLoc.getChunk().load();
|
||||||
}
|
}
|
||||||
player.teleport(fLoc);
|
player.teleport(fLoc);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
Bukkit.getScheduler().runTask(plugin, new Runnable() {
|
||||||
|
@ -3,7 +3,7 @@ author: darkwarriros,Xephi
|
|||||||
website: http://www.multiplayer-italia.com/
|
website: http://www.multiplayer-italia.com/
|
||||||
description: AuthMe prevents people, which aren't logged in, from doing stuff like placing blocks, moving, typing commands or seeing the inventory of the current player.
|
description: AuthMe prevents people, which aren't logged in, from doing stuff like placing blocks, moving, typing commands or seeing the inventory of the current player.
|
||||||
main: uk.org.whoami.authme.AuthMe
|
main: uk.org.whoami.authme.AuthMe
|
||||||
version: 2.7.15
|
version: 2.7.15b1
|
||||||
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag]
|
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag]
|
||||||
commands:
|
commands:
|
||||||
register:
|
register:
|
||||||
|
Loading…
Reference in New Issue
Block a user