Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String getVersion() // Returns the plugin's version.
- UUID[] getBanList() // Returns an array with the banned uuids.
- String getMessage(String path) // Returns a message from a given path.
- Boolean getSetting(String path) // Returns a setting from a given path.
- Integer getViolationResetTime() // Returs the violation reset time in seconds.
- void setVerbose(Player p, Boolean value) // Allows you to toggle a player's verbose system.
- Boolean hasVerboseEnabled(Player p) // Returns a boolean depending if a player has a verbose system enabled.
- Integer getPing(Player p) // Returns a player's latency in milliseconds.
- Double getTps() // Returns the accurate amount of the server's TPS.
- Boolean hasPermission(Player p, Permission Permission) // Returns a boolean depending if a player has a permission.
- void addPermission(Player p, Permission Permission) // Temporarily adds a Spartan permission to a player via the ram.
- Boolean isEnabled(HackType HackType) // Returns a boolean depending if a check is enabled.
- Integer getVL(Player p, HackType HackType) // Returns the amount of violations a player has in a check.
- Integer getVL(Player p) // Returns the amount of violations a player has.
- void setVL(Player p, HackType HackType, Integer amount) // Allows you to change a player's violation in a certain check.
- void reloadConfig() // Reloads Spartan's configuration
- void enableSilentChecking(HackType HackType) // Makes a check silent.
- void disableSilentChecking(HackType HackType) // Makes a check cancellable.
- Boolean isSilent(HackType HackType) // Returns a boolean depending if a check is silent.
- void enableCheck(HackType HackType) // Enables a check.
- void disableCheck(HackType HackType) // Disables a check.
- void cancelCheck(Player p, HackType HackType, Integer ticks) // Cancels a check for a certain amount of ticks.
- void cancelCheckPerVerbose(Player p, String string, Integer ticks) // Cancels a check's detection depending on the verbose for a certain amount of ticks.
- void startCheck(Player p, HackType HackType) // Allows a check to check a certain player if it was previously stopped.
- void stopCheck(Player p, HackType HackType) // Stops a check from checking a certain player.
- Integer getCPS(Player p) // Returns the amount of clicks-per-second a player has.
- void resetVL() // Resets violations from all players.
- void resetVL(Player p) // Resets violations from a certain player.
- Boolean isBypassing(Player p) // Returns a boolean depending if a player bypasses all checks.
- Boolean isBypassing(Player p, HackType HackType) // Returns a boolean depending if a player bypasses a certain check.
- Boolean isBanned(UUID uuid) // Returns a boolean depending if a player is banned.
- void banPlayer(UUID punished, String reason) // Bans a uuid with a given reason.
- void unbanPlayer(UUID uuid) // Unbans a uuid.
- String getBanReason(UUID uuid) // Returns a uuid's ban reason.
- String getBanPunisher(UUID uuid) // Returns a uuid's ban punisher.
- Boolean hasMiningNotificationsEnabled(Player player) // Returns a Boolean depending if a player has mining-notifications enabled.
- void setMiningNotifications(Player player, Boolean b) // Allows you to toggle a player's mining-notifications system.
- void addToWave(UUID uuid) // Adds a UUID to the punishment wave.
- void removeFromWave(UUID uuid) // Removes a UUID from the punishment wave.
- Boolean isAddedToTheWave(UUID uuid) // Returns a boolean depending if a uuid is add to the punishment wave.
- void runWave() // Executes the punishment wave.
- void clearWave() // Clears the punishment wave.
- Integer getWaveSize() // Returns the amount of uuids added to the punishment wave.
- UUID[] getWaveList() // Returns an array with the uuids added in the wave.
- void warnPlayer(Player p, String reason) // Warns a player with a Spartan message.
- void reloadPermissionCache(Player p) // Reloads the permission cache of a certain player.
- void reloadPermissionCache() // Reloads the global permission cache.
- void sendClientSidedBlock(Player p, Location loc, Material m, byte b) // Sends a client-sided block and saves it into the memory for util handling.
- void destroyClientSidedBlock(Player p, Location loc) // Resets a block if it exists in the client-sided block memory.
- Boolean containsClientSidedBlock(Player p, Location loc) // Returns if a block is contained in the client-sided block memory.
- Material getClientSidedBlockMaterial(Player p, Location loc) // Returns the material of a saved client-sided block.
- Byte getClientSidedBlockData(Player p, Location loc) // Returns the data in bytes of a saved client-sided block.
- void removeClientSidedBlocks(Player p) // Removes and resets all saved client-sided blocks.
- void disableVelocityProtection(Player p, Integer ticks) // Disables the velocity protection for the given ticks.
- String getConfiguredCheckName(HackType HackType) // Returns the configured name of a check.
- void setConfiguredCheckName(HackType HackType, String name) // Sets the configured name of a check.
- @EventHandler
- public void Event(CheckCancelEvent e) {
- Player p = e.getPlayer();
- HackType h = e.getHackType();
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the cancelation.
- }
- @EventHandler
- public void Event(CheckToggleEvent e) {
- HackType h = e.getHackType();
- ToggleAction ta = e.getToggleAction()
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the toggle action.
- }
- @EventHandler
- public void Event(ViolationResetEvent e) {
- int time = e.getTime();
- Boolean b = e.isCancelled();
- ArrayList<HackType> a = e.getIgnoredChecks();
- e.setCancelled(true); // Stops the violations from resetting.
- e.ignoreCheck(HackType.NormalMovements); // Stops a check's violations from being reset.
- e.setIgnoredChecks(new ArrayList<HackType>()) // Stops the violations from multiple checks from being reset.
- }
- @EventHandler
- public void Event(SpartanReloadEvent e) {
- Plugin pl = e.getPlugin();
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the reload.
- }
- @EventHandler
- public void Event(PlayerViolationEvent e) {
- Player p = e.getPlayer();
- HackType h = e.getHackType();
- String m = e.getMessage();
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the violation.
- }
- @EventHandler
- public void Event(MachineLearningEvent e) {
- Player p = e.getPlayer();
- double default = e.getDefaultPercentage(); // Returns the default legitimacy percentage.
- double average = e.getAveragePercentage(); // Returns the average legitimacy percentage.
- Boolean combat = e.isCombatRelated(); // Returns a boolean depending if the player is in combat.
- Boolean contact = e.isContactRelated() // Returns a boolean depending if the player is starting some combat.
- }
- @EventHandler
- public void Event(CheckSilentToggleEvent e) {
- HackType h = e.getHackType();
- ToggleAction ta = e.getToggleAction()
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the silent toggle action.
- }
- @EventHandler
- public void Event(PlayerViolationCommandEvent e) {
- Player p = e.getPlayer();
- HackType h = e.getHackType();
- String c = e.getCommand();
- Boolean b = e.isCancelled();
- e.setCancelled(true); // Cancels the command.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement