A
Admincraft•7mo ago
Cobes

how to block end gateway travel

Im messing around with Worldguard flags trying to find a way to prevent players from travelling through the end gateway unless they are in a permission group that they obtain after killing the dragon. I disabled the enderpearls flag, which works when an enderpearl collides with a block, but it doesnt stop them from working on the end gateway block
52 Replies
Admincraft Meta
Admincraft Meta•7mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by uncle_cobes#0
Snowz
Snowz•7mo ago
probably make a plugin for it
wiw
wiw•7mo ago
can't they just build to the end islands?
QarthO
QarthO•7mo ago
might be able to use chunkyborder and have it be the size of the mainisland. you can then give a bypass permission to the permision group so they can just ignore the border and tp out this also fixes the "cant they just build or tp out" cause chunkyborder has an option to tp them back inside the border (using the wrap function) Now I have no clue how this actually works in practice since its supposed to be just a world border. but hey! seems like it mite fit ur needs
cal
cal•7mo ago
//FOR SPIGOT
@EventHandler
private void onGatewayTeleport(PlayerTeleportEvent event ) {
if(event.getCause() == PlayerTeleportEvent.TeleportCause.END_GATEWAY && !(event.getPlayer().hasPermission("your.permission.here") || event.getPlayer().isOp())) {
event.setCancelled(true);
}
}
//FOR PAPER (SPIGOT VERSION WORKS TOO)
@EventHandler
private void onGatewayTeleport(PlayerTeleportEndGatewayEvent event) {
if(!(event.getPlayer().hasPermission("your.permission.here") || event.getPlayer().isOp())){
event.setCancelled(true);
}
}
//FOR SPIGOT
@EventHandler
private void onGatewayTeleport(PlayerTeleportEvent event ) {
if(event.getCause() == PlayerTeleportEvent.TeleportCause.END_GATEWAY && !(event.getPlayer().hasPermission("your.permission.here") || event.getPlayer().isOp())) {
event.setCancelled(true);
}
}
//FOR PAPER (SPIGOT VERSION WORKS TOO)
@EventHandler
private void onGatewayTeleport(PlayerTeleportEndGatewayEvent event) {
if(!(event.getPlayer().hasPermission("your.permission.here") || event.getPlayer().isOp())){
event.setCancelled(true);
}
}
if you want to make a plugin ^^ if you cant i can just whip one up for you quick just lmk :)
QarthO
QarthO•7mo ago
btw u dont want to check if the player is op, bukkit automatically defaults ops to true if no permission is set you'd want to leave the abliity to set a permission to false, so u can optionally have ops not go thru the gateway, but if ur checking if they're ops then u cant do that
cal
cal•7mo ago
doesnt this depend on whether or not the permission is registered in plugin.yml?
QarthO
QarthO•7mo ago
it depends on the permission manager is using the bukkit api which luckperms does
cal
cal•7mo ago
but bukkit only registers permissions that are in plugin.yml no?
QarthO
QarthO•7mo ago
they have an api for registering permissions
cal
cal•7mo ago
do you see registerpermissions in the code i gave
QarthO
QarthO•7mo ago
u didnt give any code for registering permissions?
cal
cal•7mo ago
yes! that is in fact my point!
QarthO
QarthO•7mo ago
luckperms does it for u my guy thats what im saying ^ permission manager! btw i never register permissions in the plugin.yml and this works perfectly fine for me everytime ive done it
cal
cal•7mo ago
and anyway if i remove the player.isop and dont register the perm in luckperms it just doesnt work if im opped lul
QarthO
QarthO•7mo ago
u dont have to register the perm u dont have to do anything
cal
cal•7mo ago
register as in
QarthO
QarthO•7mo ago
just remove op and it works
cal
cal•7mo ago
lp user usr permission set <perm> if i dont do that while opped it just doesnt work :Shrug:
QarthO
QarthO•7mo ago
it works fine without u doing that
cal
cal•7mo ago
okay đź‘Ť
QarthO
QarthO•7mo ago
(btw only done this on paper servers, so idk if paper handles it difff) theres a chance spigot doesnt do this, but fuck spigot
cal
cal•7mo ago
sometimes you dont have a choice
QarthO
QarthO•7mo ago
theres always a choice lmao
cal
cal•7mo ago
if the person commissioning asks for a spigot plugin? :^)
QarthO
QarthO•7mo ago
if someone is willing to pay u money for a spigot plugin, then they will be easily understanding when u tell them what paper is
cal
cal•7mo ago
some people still want to use spigot :Shrug:
Skullians
Skullians•7mo ago
Well screw them
QarthO
QarthO•7mo ago
then i wont wok with them lmao
Skullians
Skullians•7mo ago
They’re on a dying platform
QarthO
QarthO•7mo ago
they need to learn theres no reason to be on spigot
Skullians
Skullians•7mo ago
^^ no benefit
QarthO
QarthO•7mo ago
u still lose vanilla compat with redstone
cal
cal•7mo ago
? wdym you're also forgetting that theres 150k+ servers running spigot
QarthO
QarthO•7mo ago
some of the spigot patches will still break certain redstone machines still a lot more on paper!
cal
cal•7mo ago
ohh thats what you meant only 110k
QarthO
QarthO•7mo ago
No description
QarthO
QarthO•7mo ago
wat paper has so much more, and all the other ones are forks of paper
cal
cal•7mo ago
oh wtf my fault
QarthO
QarthO•7mo ago
yeah bro ur just striaght up troolling using spgot
cal
cal•7mo ago
just read the label at the top didnt realise it included all the forks too i mean 34k servers is still a good amount of servers and developing for spigot works on paper anyway so
QarthO
QarthO•7mo ago
u can do so much more with paper developing for paper also helps out the 34k servers that are stuck in the past
cal
cal•7mo ago
not familiar with what more you can do with paper please enlighten me
QarthO
QarthO•7mo ago
a really big thing as of 1.21 is all the new registries
Skullians
Skullians•7mo ago
^^
QarthO
QarthO•7mo ago
u can register ur commands so they work in datapacks and the function command
cal
cal•7mo ago
does spigot not support registries or what
QarthO
QarthO•7mo ago
not natively u also can have full custom mob ai thru the paper api without touching nms
Skullians
Skullians•7mo ago
wait really? didn’t know about that one Also I was going to say PDC is cool too but that’s spigot as well kek
QarthO
QarthO•7mo ago
brigadier support alot more events for example this event rite here custom library loader
cal
cal•7mo ago
:Shrug:

Did you find this page helpful?