Search code examples
javaminecraftbukkit

Spigot API | Player Expand player class


Is it possible to expand the Player class of the Spigot API like this:

String playername = "PlayerDummy";
Player player = Bukkit.getPlayer(playername);
    if (player.isSuspicious()) {
    // do sth
}

can I add the isSuspicious() method to the Player class?


Solution

  • Not in a way that would be useful. Make a static isSuspicious method in your own class and do isSuspicious(player) instead.