This tiny plugin will prevent exp to be issued when a player extract an item/items from a furnace.
Command:
- /nfexp : toggle no furnace exp mode.
Permissions:
- nfexp.toggle : allows you to toggle no furnace exp mode.
Code:
Spoiler
package com.vk2gpz.nofurnaceexp;
import org.bukkit.command.*;
import org.bukkit.event.*;
import org.bukkit.event.inventory.FurnaceExtractEvent;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.*;
public class NoFurnaceExp extends JavaPlugin implements CommandExecutor, Listener {
private boolean noExp;
@Override
public void onEnable() {
this.saveDefaultConfig();
noExp = getConfig().getBoolean("NoExpMode", true);
getCommand("nfexp").setExecutor(this);
getServer().getPluginManager().registerEvents(this, this);
PluginDescriptionFile pdfile = getDescription();
getLogger().info(pdfile.getName() + " version " + pdfile.getVersion() + " is Enabled");
}
@Override
public void onDisable() {
PluginDescriptionFile pdFile = getDescription();
getLogger().info(pdFile.getName() + " version " + pdFile.getVersion() + " is Disabled");
}
@Override
public boolean onCommand(CommandSender s, Command c, String l, String[] a) {
if (s.hasPermission("nfexp.toggle")) {
noExp = !noExp;
s.sendMessage("§6No exp mode §c" + (noExp ? "enabled" : "disabled") + "§6.");
}
return true;
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onFurnaceExtract(FurnaceExtractEvent e) {
if (noExp) {
e.setExpToDrop(0);
}
}
}Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta