Mineuniverse
Log in Register
Plugins

BlockLock (coding liberary)

BlockLock (coding liberary)
by _ForgeUser12992347
Download Claim this project
2,050 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Developer Tools

This is NOT an plugin with commands!
This plugin/code is NOT for any server extras.
VERY IMPORTANT:
Only java coders can use this!

BlockLock.start(String "TheLockName", Player PlayerWhoOpensLock, Runnable WhatToDoOnSucces, Plugin PluginThisActionShouldAttachTo, Runnable RunWhenCodeIsWrongCanBeNULLtoo, Boolean IsTheLockQuitable);
Preview for a login lock:
private Plugin me;
public void onEnable(){
if(getConfig().get("Created") == null){
getConfig().set("Created", true);
saveConfig();
reloadConfig();
me = this;
}
Bukkit.getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onJoinLock(PlayerJoinEvent e){
final Player ply = (Player) e.getPlayer();
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable(){
@Override
public void run() {
BlockLock.start(ply, "Join_Login", new Runnable(){
@Override
public void run(){
ply.sendMessage("Welcome to ....'s network!");
}
}, me, new Runnable(){
@Override
public void run(){
ply.kickPlayer("Enter the correct code!");
}
}, false);
}
});
}

Events:

@EventHandler
public void onFail(LockDenyEvent e){
Player ply = (Player) e.getPlayer();
String LockName = e.lockName();
}
@EventHandler
public void onFinish(LockFinishEvent e){
Player ply = (Player) e.getPlayer();
String LockName = e.lockName();
}


Codes are saved to the config.
Hope this speedup your protection coding a bit!
Good luck, JMteam09

Milestones:
10 Downloads
50 Downloads
100 Downloads
250 Downloads
500 Downloads
1000 Downloads

PB 4.0 (Public Release)
MC CB 1.7.9-R0.2
Release 2015-01-24 Get
PublicRelease1.5
MC CB 1.7.9-R0.2
Release 2015-01-22 Get
PublicRelease2.0
MC CB 1.7.9-R0.2
Release 2015-01-22 Get
Fix Release 2.0
MC CB 1.7.9-R0.2
Release 2015-01-22 Get
PublicRelease3.0
MC CB 1.7.9-R0.2
Release 2015-01-22 Get
PublicRelease1.0
MC CB 1.7.9-R0.2
Release 2015-01-21 Get

You Might Also Like

WorldGuard Custom Flags
WorldGuard Custom Flags
97,851
HoloAPI
Advanced and powerful holographic displays
93,959
Minequery
Minequery
91,099
SQLibrary
SQLibrary aims to streamline driver wrappers in Java for every database engine
85,675
WolfyUtilities
Utils and APIs: Config, Language and Inventory API, Protection Utils: WorldGuard, LWC, PlotSquared
84,728
DisguiseTester
Experiment with disguises!
9,677