Skip to content

A moderation plugin that prevents players from moving and doing certain actions.

License

Notifications You must be signed in to change notification settings

SirBlobman/Freeze

Repository files navigation

Freeze

A moderation plugin that prevents players from moving and doing certain actions.

Requirements

Downloads

SpigotMC

Freeze API

Dependency Information

Maven Repository:

<!-- SirBlobman Public Repository -->
<repository>
    <id>sirblobman-public</id>
    <url>https://nexus.sirblobman.xyz/public/</url>
</repository>

Maven Dependency:

<!-- Freeze Plugin -->
<dependency>
    <groupId>com.github.sirblobman</groupId>
    <artifactId>freeze</artifactId>
    <version>2.5-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>

Bukkit plugin.yml:

depend:
  - "Freeze"

Check if a player is frozen:

Ensure that you have Freeze as a dependency and that the plugin is installed on the server.

FreezeHook.java

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

import com.github.sirblobman.freeze.FreezePlugin;
import com.github.sirblobman.freeze.manager.FreezeManager;

public final class FreezeHook {
    public static boolean isEnabled() {
        PluginManager pluginManager = Bukkit.getPluginManager();
        return pluginManager.isPluginEnabled("Freeze");
    }

    public static boolean isFrozen(Player player) {
        FreezePlugin plugin = JavaPlugin.getPlugin(FreezePlugin.class);
        FreezeManager freezeManager = plugin.getFreezeManager();
        return freezeManager.isFrozen(player);
    }
}

Events

There are two events you can use from this plugin:

  • com.github.sirblobman.freeze.event.PlayerFreezeEvent
  • com.github.sirblobman.freeze.event.PlayerMeltEvent