mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 22:26:45 +01:00
bug fixes
This commit is contained in:
parent
2335b08728
commit
d71ab93760
@ -253,7 +253,7 @@ public class PlotMain extends JavaPlugin {
|
|||||||
public static boolean removePlot(String world, PlotId id) {
|
public static boolean removePlot(String world, PlotId id) {
|
||||||
PlotDeleteEvent event = new PlotDeleteEvent(world,id);
|
PlotDeleteEvent event = new PlotDeleteEvent(world,id);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if(!event.isCancelled()) {
|
if(event.isCancelled()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ public class PlotMain extends JavaPlugin {
|
|||||||
if (PlayerFunctions.hasExpired(plot)) {
|
if (PlayerFunctions.hasExpired(plot)) {
|
||||||
PlotDeleteEvent event = new PlotDeleteEvent(world,plot.id);
|
PlotDeleteEvent event = new PlotDeleteEvent(world,plot.id);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if(!event.isCancelled()) {
|
if(event.isCancelled()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -313,7 +313,7 @@ public class PlotMain extends JavaPlugin {
|
|||||||
if (PlayerFunctions.hasExpired(plot)) {
|
if (PlayerFunctions.hasExpired(plot)) {
|
||||||
PlotDeleteEvent event = new PlotDeleteEvent(world,plot.id);
|
PlotDeleteEvent event = new PlotDeleteEvent(world,plot.id);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if(!event.isCancelled()) {
|
if(event.isCancelled()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -320,7 +320,7 @@ public class WorldGenerator extends ChunkGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WALLS (16/16 cuboids)
|
// WALLS (16/16 cuboids)
|
||||||
|
if (pathsize>0) {
|
||||||
if (plotMinZ+1<=16) {
|
if (plotMinZ+1<=16) {
|
||||||
double start,end;
|
double start,end;
|
||||||
if (plotMinX+2<=16)
|
if (plotMinX+2<=16)
|
||||||
@ -393,6 +393,7 @@ public class WorldGenerator extends ChunkGenerator {
|
|||||||
setCuboidRegion( 16-roadStartX, 16-roadStartX+1, 1, wallheight+1, start, 16,wallfilling);
|
setCuboidRegion( 16-roadStartX, 16-roadStartX+1, 1, wallheight+1, start, 16,wallfilling);
|
||||||
setCuboidRegion( 16-roadStartX, 16-roadStartX+1,wallheight+1, wallheight+2, start, 16, wall);
|
setCuboidRegion( 16-roadStartX, 16-roadStartX+1,wallheight+1, wallheight+2, start, 16, wall);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class Set extends SubCommand{
|
|||||||
Flag flag = plot.settings.getFlag(args[1].toLowerCase());
|
Flag flag = plot.settings.getFlag(args[1].toLowerCase());
|
||||||
PlotFlagRemoveEvent event = new PlotFlagRemoveEvent(flag,plot);
|
PlotFlagRemoveEvent event = new PlotFlagRemoveEvent(flag,plot);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if(!event.isCancelled()) {
|
if(event.isCancelled()) {
|
||||||
PlayerFunctions.sendMessage(plr, C.FLAG_NOT_REMOVED);
|
PlayerFunctions.sendMessage(plr, C.FLAG_NOT_REMOVED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return false;
|
return false;
|
||||||
@ -119,7 +119,7 @@ public class Set extends SubCommand{
|
|||||||
Flag flag = new Flag(args[1], value);
|
Flag flag = new Flag(args[1], value);
|
||||||
PlotFlagAddEvent event = new PlotFlagAddEvent(flag,plot);
|
PlotFlagAddEvent event = new PlotFlagAddEvent(flag,plot);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if(!event.isCancelled()) {
|
if(event.isCancelled()) {
|
||||||
PlayerFunctions.sendMessage(plr, C.FLAG_NOT_ADDED);
|
PlayerFunctions.sendMessage(plr, C.FLAG_NOT_ADDED);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user