Block command plugin

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Yanny

Feedback score
1
Posts
90
Reactions
15
Resources
0
yes, a command block Lol[DOUBLEPOST=1571678949][/DOUBLEPOST]but if u want people to waste time ngl we can do it :d
 
Last edited:

Scifi

Supreme
Feedback score
4
Posts
577
Reactions
208
Resources
4
Time for sudo code

@EventHandler
public void onBlockInteract(PlayerInteractEvent e){
if(e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_BLOCK){
if(!e.getClickedBlock().getType() == Material.AIR) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "broadcast test")
}
}
}
 

Public

Banned
Feedback score
0
Posts
15
Reactions
1
Resources
0
yes, a command block Lol[DOUBLEPOST=1571678949][/DOUBLEPOST]but if u want people to waste time ngl we can do it :d
Are you 1IQ
 
Banned forever. Reason: Ban Evading (Rooftop, https://builtbybit.com/members/lofi.34798/)

Brock

Director of Versed Studios
Supreme
Feedback score
16
Posts
401
Reactions
73
Resources
0
Add me on discord to discuss this OGRunner#0001
 

Tyler

Developer
Supreme
Feedback score
14
Posts
2,589
Reactions
2,238
Resources
0
Time for sudo code

@EventHandler
public void onBlockInteract(PlayerInteractEvent e){
if(e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_BLOCK){
if(!e.getClickedBlock().getType() == Material.AIR) {
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "broadcast test")
}
}
}
If someone is looking for a simple plugin like this, I'm sure they don't know how to compile that code. Plus you only gave them an event. Plus that would only be usable to run one command when you click on any block in the world. And you don't have to check if the block type is not air after checking if the Action is clicking a block. And you could just use "e.getClickedBlock().getType() != Material.AIR" instead of "!e.getClickedBlock().getType() == Material.AIR".

A simple google search found me this plugin: https://www.spigotmc.org/resources/commandblocks.62720/
 
Last edited:

Norska

Java Developer (https://norska.dev)
Supreme
Feedback score
68
Posts
901
Reactions
1,407
Resources
14
If it's just customizable commands that run on blocks you select don't pay anyone too much, this is worth 5$-10$ max.
 
Status
This thread has been locked.
Top