mirror of
https://github.com/darksaid98/AlathranCommands.git
synced 2026-12-03 00:18:49 +00:00
Fixed Null bug
This commit is contained in:
1 parent
de50de3042
commit
262a553e9e
3 files changed
+25
-11
No files matched your search
@@ -94,6 +94,13 @@ public class CommandTpa implements CommandExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
if (!p.isOnline()) {
|
||||||
|
task.cancel();
|
||||||
|
task = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (time == 0) {
|
if (time == 0) {
|
||||||
task.cancel();
|
task.cancel();
|
||||||
p.sendMessage(colorize(clicktpa.getConfig().getString("Player-teleportation-request-expire")));
|
p.sendMessage(colorize(clicktpa.getConfig().getString("Player-teleportation-request-expire")));
|
||||||
@@ -117,12 +124,12 @@ public class CommandTpa implements CommandExecutor {
|
|||||||
task = null;
|
task = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (clicktpa.getTpaPlayers().get(p).getMode() == TeleportMode.TELEPORTING) {
|
if (clicktpa.getTpaPlayers().get(p).getMode() == TeleportMode.TELEPORTING) {
|
||||||
task.cancel();
|
task.cancel();
|
||||||
task = null;
|
task = null;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time = time - 1;
|
time = time - 1;
|
||||||
|
|||||||
@@ -93,6 +93,13 @@ public class CommandTpaHere implements CommandExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
System.out.println(clicktpa.getTpaPlayers());
|
||||||
|
|
||||||
|
if (!p.isOnline()) {
|
||||||
|
task.cancel();
|
||||||
|
task = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (time == 0) {
|
if (time == 0) {
|
||||||
task.cancel();
|
task.cancel();
|
||||||
p.sendMessage(colorize(clicktpa.getConfig().getString("Player-teleportation-request-expire")));
|
p.sendMessage(colorize(clicktpa.getConfig().getString("Player-teleportation-request-expire")));
|
||||||
@@ -116,12 +123,12 @@ public class CommandTpaHere implements CommandExecutor {
|
|||||||
task = null;
|
task = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (clicktpa.getTpaPlayers().get(p).getMode() == TeleportMode.TELEPORTING) {
|
if (clicktpa.getTpaPlayers().get(p).getMode() == TeleportMode.TELEPORTING) {
|
||||||
task.cancel();
|
task.cancel();
|
||||||
task = null;
|
task = null;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time = time - 1;
|
time = time - 1;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: ClickTpa
|
name: ClickTpa
|
||||||
version: 1.6.4
|
version: 1.7
|
||||||
main: com.jklmao.plugin.ClickTpa
|
main: com.jklmao.plugin.ClickTpa
|
||||||
authors: [ jklmao ]
|
authors: [ jklmao ]
|
||||||
description: Simple TPA plugin for Spigot/Paper Software
|
description: Simple TPA plugin for Spigot/Paper Software
|
||||||
|
|||||||
Reference in new issue
Block a user