Code cleanup and Optimizations

This commit is contained in:
MattBDev
2016-03-29 00:56:44 -04:00
parent 49d18b9229
commit 32ba55baf5
34 changed files with 456 additions and 540 deletions

View File

@ -1,16 +1,15 @@
package com.plotsquared.sponge.events;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import org.spongepowered.api.event.Cancellable;
import org.spongepowered.api.event.cause.Cause;
import org.spongepowered.api.event.impl.AbstractEvent;
import com.intellectualcrafters.plot.object.PlotId;
public class PlotClearEvent extends AbstractEvent implements Cancellable {
private final Plot plot;
private boolean cancelled;
private Plot plot;
/**
* PlotDeleteEvent: Called when a plot is cleared
@ -23,31 +22,31 @@ public class PlotClearEvent extends AbstractEvent implements Cancellable {
}
/**
* Get the PlotId
* Get the PlotId.
*
* @return PlotId
*/
public PlotId getPlotId() {
return plot.getId();
return this.plot.getId();
}
/**
* Get the world name
* Get the world name.
*
* @return String
*/
public String getWorld() {
return plot.getArea().worldname;
return this.plot.getArea().worldname;
}
@Override
public boolean isCancelled() {
return cancelled;
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
cancelled = cancel;
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@Override