mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2024-11-13 05:54:03 +01:00
a bit of cleanup for denypearl functionality, and made setting enable itself for people updating from older versions of the plugin where it defaulted to false (as it now defaults to true); this is done since the changed functionality should now be desirable for most people
This commit is contained in:
parent
9e7e9d0682
commit
41912f9e17
@ -518,7 +518,7 @@ public class Config
|
||||
}
|
||||
|
||||
|
||||
private static final int currentCfgVersion = 9;
|
||||
private static final int currentCfgVersion = 10;
|
||||
|
||||
public static void load(WorldBorder master, boolean logIt)
|
||||
{ // load config from file
|
||||
@ -567,6 +567,10 @@ public class Config
|
||||
else
|
||||
updateMessage(msg);
|
||||
|
||||
// this option defaulted to false previously, but what it actually does has changed to something that almost everyone should now want by default
|
||||
if (cfgVersion < 10)
|
||||
denyEnderpearl = true;
|
||||
|
||||
ConfigurationSection worlds = cfg.getConfigurationSection("worlds");
|
||||
if (worlds != null)
|
||||
{
|
||||
|
@ -901,7 +901,7 @@ public class WBCommand implements CommandExecutor
|
||||
sender.sendMessage(cmd+" bypasslist " + clrDesc + " - list players with border bypass enabled.");
|
||||
sender.sendMessage(cmd+" fillautosave " + clrReq + "<seconds>" + clrDesc + " - world save interval for Fill.");
|
||||
sender.sendMessage(cmd+" portal " + clrReq + "<on|off>" + clrDesc + " - turn portal redirection on or off.");
|
||||
sender.sendMessage(cmd+" denypearl " + clrReq + "<on|off>" + clrDesc + " - stop ender pearls thrown past the border.");
|
||||
sender.sendMessage(cmd+" denypearl " + clrReq + "<on|off>" + clrDesc + " - stop ender pearls past the border.");
|
||||
sender.sendMessage(cmd+" reload" + clrDesc + " - re-load data from config.yml.");
|
||||
sender.sendMessage(cmd+" debug " + clrReq + "<on|off>" + clrDesc + " - turn console debug output on or off.");
|
||||
if (page == 4)
|
||||
|
@ -27,7 +27,6 @@ public class WBListener implements Listener
|
||||
{
|
||||
if(event.getCause() == PlayerTeleportEvent.TeleportCause.ENDER_PEARL && Config.getDenyEnderpearl())
|
||||
{
|
||||
event.getPlayer().sendMessage(Config.Message());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class WorldFillTask implements Runnable
|
||||
|
||||
int chunkWidthX = (int) Math.ceil((double)((border.getRadiusX() + 16) * 2) / 16);
|
||||
int chunkWidthZ = (int) Math.ceil((double)((border.getRadiusZ() + 16) * 2) / 16);
|
||||
int biggerWidth = (chunkWidthX > chunkWidthZ) ? chunkWidthX : chunkWidthZ; //We need to calculate the reportTarget with the bigger with, since the spiral will only stop if it has a size of biggerWidth x biggerWidth
|
||||
int biggerWidth = (chunkWidthX > chunkWidthZ) ? chunkWidthX : chunkWidthZ; //We need to calculate the reportTarget with the bigger width, since the spiral will only stop if it has a size of biggerWidth x biggerWidth
|
||||
this.reportTarget = (biggerWidth * biggerWidth) + biggerWidth + 1;
|
||||
|
||||
//This would be another way to calculate reportTarget, it assumes that we don't need time to check if the chunk is outside and then skip it (it calculates the area of the rectangle/ellipse)
|
||||
|
Loading…
Reference in New Issue
Block a user