mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
I couldn't hold it in. (Attempt to get rid of spotty).
This commit is contained in:
1 parent
b518f108d0
commit
3f38bdabe1
1 file changed
+11
@@ -72,6 +72,17 @@ public class PlayerManager
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final String name = player.getName();
|
final String name = player.getName();
|
||||||
|
|
||||||
|
// Sometimes, JavaBukkit likes to tie itself into a knot.
|
||||||
|
// And troll us with player variable showing somebody else.
|
||||||
|
// Because spotty haunts us in our dreams,
|
||||||
|
// I have to place these annotations and place this hacky fix here.
|
||||||
|
player = Bukkit.getPlayerExact(name);
|
||||||
|
|
||||||
|
// Why, Why, Whyyyyy!
|
||||||
|
if (player == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (level.get(name) == null || level.get(name) == 0)
|
if (level.get(name) == null || level.get(name) == 0)
|
||||||
{
|
{
|
||||||
level.put(name, 1);
|
level.put(name, 1);
|
||||||
|
|||||||
Reference in new issue
Block a user