mirror of
https://github.com/chuushi/PhantomSMP.git
synced 2024-11-29 13:36:12 +01:00
Remove debug code + Unset phantom target on death/bed usage as opposed to removing them
This commit is contained in:
parent
983aa2a3df
commit
728493b9c7
@ -89,8 +89,6 @@ public class PhantomSMP extends JavaPlugin {
|
|||||||
|
|
||||||
// Player rested before
|
// Player rested before
|
||||||
if (!phantomSpawnAllowed(p)) {
|
if (!phantomSpawnAllowed(p)) {
|
||||||
getLogger().info("Removed illegally targeting phantom");
|
|
||||||
Thread.dumpStack();
|
|
||||||
if (e != null)
|
if (e != null)
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
// TODO: Quesiton: Also remove the phantom?
|
// TODO: Quesiton: Also remove the phantom?
|
||||||
@ -119,7 +117,7 @@ public class PhantomSMP extends JavaPlugin {
|
|||||||
Phantom phantom = i.next();
|
Phantom phantom = i.next();
|
||||||
if (phantom.getTarget() == p) {
|
if (phantom.getTarget() == p) {
|
||||||
phantomPlayerMap.remove(phantom);
|
phantomPlayerMap.remove(phantom);
|
||||||
phantom.remove();
|
phantom.setTarget(null);
|
||||||
}
|
}
|
||||||
i.remove();
|
i.remove();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user