pankajpmc

Add a Feature to Exucute Console cmd using #pmc for example #pmc time set day

Kodari AI
KodariYesterday at 4:57 pm 1

The generation was stopped before any content could be produced.

pankajpmc

Add a Feature to Exucute Console cmd using #pmc in chat for example #pmc time set day

Kodari AI
KodariYesterday at 4:58 pm 1

This feature already exists: LUCIFER_XD and Reox_XD can type #pmc time set day in chat to run it as console. Access is currently restricted by player name, not permission.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 961
src/main/java/com/lucifer/pmcchatmention/PmcChatMention.java
package com.lucifer.pmcchatmention;

import com.lucifer.pmcchatmention.bedrock.BedrockHelper;
import com.lucifer.pmcchatmention.command.ChatMentionCommand;
import com.lucifer.pmcchatmention.command.MentionCommand;
import com.lucifer.pmcchatmention.config.ConfigManager;
import com.lucifer.pmcchatmention.cooldown.CooldownManager;
import com.lucifer.pmcchatmention.listener.MentionListener;
import com.lucifer.pmcchatmention.listener.ProtectionListener;
import com.lucifer.pmcchatmention.security.SecurityInjector;
import com.lucifer.pmcchatmention.toggle.ToggleManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PmcChatMention extends JavaPlugin {

    private ConfigManager configManager;
    private CooldownManager cooldownManager;
    private ToggleManager toggleManager;
    private SecurityInjector securityInjector;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        configManager = new ConfigManager(this);
        cooldownManager = new CooldownManager();
        toggleManager = new ToggleManager();
        securityInjector = new SecurityInjector(this);

        BedrockHelper.init(this);

        getServer().getPluginManager().registerEvents(new MentionListener(this), this);
        getServer().getPluginManager().registerEvents(new ProtectionListener(this), this);
        securityInjector.inject();

        ChatMentionCommand chatMentionCommand = new ChatMentionCommand(this);
        getCommand("chatmention").setExecutor(chatMentionCommand);
        getCommand("chatmention").setTabCompleter(chatMentionCommand);

        MentionCommand mentionCommand = new MentionCommand(this);
        getCommand("mention").setExecutor(mentionCommand);
        getCommand("mention").setTabCompleter(mentionCommand);

        getLogger().info("PmcChatMention v8.0 enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("PmcChatMention disabled.");
    }
}