turn this to plugin
📎
1 file
1,117 chars
📄
pasted-code-1792326382254.txt
txt
25 lines
▶
pasted-code-1792326382254.txt
txt
25 lines
options:
drill: true
command drill :
usage: /drill
permission: pick.give
permission message: &cYou do not have the required permission to perform this command
trigger:
if arg-1 is "3":
give netherite pickaxe of efficiency 5 and unbreaking 10 and mending named "&6ɢᴏʟᴅ ᴅʀɪʟʟ 3x3" to arg-2
else if arg-1 is "5":
give netherite pickaxe of efficiency 5 and unbreaking 10 and mending named "&6ɢᴏʟᴅ ᴅʀɪʟʟ 5x5" to arg-2
else:
send "&cInvalid drill size! Use 3 or 5." to sender
on block break:
if player has permission "drill.use":
if player's tool is a netherite pickaxe:
if name of player's tool is "&6ɢᴏʟᴅ ᴅʀɪʟʟ 5x5":
loop blocks in radius 3.1 around event-block:
if loop-block is not event-block:
if loop-block is stone or cobblestone or diorite or granite or andesite or sandstone or stone bricks or netherrack or nether bricks or end stone or deepslate or tuff:
break loop-block naturally using player's tool
if {@drill} is true:
play sound "block.wool.break" with volume 0.75 to player
KodariOct 18 at 12:27 pm 1
GoldenDrillPlugin
Implements a Minecraft plugin that adds golden drill pickaxes with 3x3 and 5x5 mining capabilities. Includes a /drill command with permission-based access to give players netherite pickaxes enchanted with efficiency, unbreaking, and mending, named with gold-colored text. On block break, players with the drill.use permission using these named pickaxes automatically break surrounding blocks in a radius, limited to common stone-type blocks. Features a configurable sound effect toggle for the multi-block mining action.
Created the GoldDrill plugin with /drill [3|5] [player], permission checks, enchanted pickaxe delivery, and the 5x5 drill’s nearby-block breaking and configurable sound. As in the Skript, the 3x3 pickaxe is only named and enchanted; it has no area-breaking behavior.
make it 1.21.11 paper, instead of com/kodari/drill make it com/niggapoulfyy/soullyreaper/drill
KodariOct 18 at 12:32 pm 1
Move the Java package to
com.niggapoulfyy.soullyreaper.drill.Set the plugin’s declared Paper API version to 1.21.11 and update its main class path.
Updated the plugin metadata to Paper API version 1.21.11, changed the main class path, and moved the Java package to com.niggapoulfyy.soullyreaper.drill. No build configuration was present to update.
Kodari can make mistakes. Review important code before using.
Files
src
Code
5 161
src/main/java/com/niggapoulfyy/soullyreaper/drill/GoldDrillPlugin.java
package com.niggapoulfyy.soullyreaper.drill;
import org.bukkit.plugin.java.JavaPlugin;
public final class GoldDrillPlugin extends JavaPlugin {
@Override
public void onEnable() {
saveDefaultConfig();
getCommand("drill").setExecutor(new DrillCommand());
getServer().getPluginManager().registerEvents(new DrillListener(this), this);
}
}