Implement MineplexLink spectator check

This commit is contained in:
cnr 2016-08-14 17:31:38 -04:00
parent 39b1e790cb
commit 08e65cb17e
2 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,7 @@
<dependency> <dependency>
<groupId>com.mineplex</groupId> <groupId>com.mineplex</groupId>
<artifactId>anticheat</artifactId> <artifactId>anticheat</artifactId>
<version>1.0</version> <version>1.1</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -190,6 +190,12 @@ public class AntiHack extends MiniPlugin
DisguiseBase disguise = disguiseManager.getActiveDisguise(player); DisguiseBase disguise = disguiseManager.getActiveDisguise(player);
return disguise != null ? disguise.getDisguiseType() : null; return disguise != null ? disguise.getDisguiseType() : null;
} }
@Override
public boolean isSpectator(Player player)
{
return UtilPlayer.isSpectator(player);
}
}, this._plugin, ServicePriority.Normal); }, this._plugin, ServicePriority.Normal);
ServerCommandManager.getInstance().registerCommandType(MajorViolationCommand.class, violation -> ServerCommandManager.getInstance().registerCommandType(MajorViolationCommand.class, violation ->