how to patch enderpearls trhuw world border, someone send me a patch for it! thanks!
/worldborder set (number)What WorldBorder?
/worldborder set (number)
Do you have a Plugin fot setting Worldborders? please send a downlad link please
public void onPearlClip(final PlayerTeleportEvent event) {
if (event.getCause() == PlayerTeleportEvent.TeleportCause.ENDER_PEARL) {
final Location to = event.getTo();
World w = to.getWorld();
WorldBorder wb = w.getWorldBorder();
double wbs = wb.getSize();
double wbsmid = wbs/2;
double locx = Math.abs(to.getX());
double locz = Math.abs(to.getZ());
if(locx >= wbsmid || locz >= wbsmid){
final Player player = event.getPlayer();
player.sendMessage(ChatColor.translateAlternateCodes('&',"&cYou can not go outside the worldborder!"));
event.setCancelled(true);
return;
}
where do i add this into?[DOUBLEPOST=1517580620][/DOUBLEPOST]I can add you here the code to patch it:
Code:public void onPearlClip(final PlayerTeleportEvent event) { if (event.getCause() == PlayerTeleportEvent.TeleportCause.ENDER_PEARL) { final Location to = event.getTo(); World w = to.getWorld(); WorldBorder wb = w.getWorldBorder(); double wbs = wb.getSize(); double wbsmid = wbs/2; double locx = Math.abs(to.getX()); double locz = Math.abs(to.getZ()); if(locx >= wbsmid || locz >= wbsmid){ final Player player = event.getPlayer(); player.sendMessage(plugin.color("&cYou can not go outside the worldborder!")); event.setCancelled(true); return; }
/worldborder set (wide)[DOUBLEPOST=1517580635][/DOUBLEPOST]I asked what/which border plugin you use..
idk if i even need a plugin to use that....where do i add this into?[DOUBLEPOST=1517580620][/DOUBLEPOST]
/worldborder set (wide)
where do i add this into?
You do not need a world border plugin to set the world border dependent on if you want more features, but the code that guy gave above is for a plugin so you'd need to create a plugin with that event in it.
If you need me to compile it later I can.
Like... Its 1 Block over the chunk...? how do i fix it.. it looks soo badThe code I have provided above isn't for a plugin. You use the perdefault minecraft worldborder of the server.
There is no need on using another plugin for the worldborder when the minecraft has a beautiful one.
Can you create something fast, and cheap? Cought Cought free.. as paypal is locked, tempYou do not need a world border plugin to set the world border dependent on if you want more features, but the code that guy gave above is for a plugin so you'd need to create a plugin with that event in it.
If you need me to compile it later I can.
Like... Its 1 Block over the chunk...? how do i fix it.. it looks soo bad
![]()
https://gyazo.com/92da6b6b23fa6356874582a32049df60[DOUBLEPOST=1517581499][/DOUBLEPOST]
Can you create something fast, and cheap? Cought Cought free.. as paypal is locked, temp
would be lovley ( i rep u :#)
