2015-09-11 10:09:22 +00:00
|
|
|
package com.plotsquared.bukkit.events;
|
|
|
|
|
|
|
|
import com.intellectualcrafters.plot.object.Plot;
|
|
|
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
|
|
|
import com.intellectualcrafters.plot.object.Rating;
|
2018-08-19 21:12:59 +00:00
|
|
|
import org.bukkit.event.Cancellable;
|
2016-03-23 01:41:37 +00:00
|
|
|
import org.bukkit.event.HandlerList;
|
2015-09-11 10:09:22 +00:00
|
|
|
|
2018-08-19 21:12:59 +00:00
|
|
|
public class PlotRateEvent extends PlotEvent implements Cancellable {
|
2016-03-23 01:41:37 +00:00
|
|
|
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
2015-09-11 10:09:22 +00:00
|
|
|
private final PlotPlayer rater;
|
|
|
|
private Rating rating;
|
2018-08-19 21:12:59 +00:00
|
|
|
private boolean cancelled = false;
|
2016-03-23 01:41:37 +00:00
|
|
|
|
|
|
|
public PlotRateEvent(PlotPlayer rater, Rating rating, Plot plot) {
|
2015-09-11 10:09:22 +00:00
|
|
|
super(plot);
|
|
|
|
this.rater = rater;
|
|
|
|
this.rating = rating;
|
|
|
|
}
|
2016-03-23 01:41:37 +00:00
|
|
|
|
2015-09-13 04:04:31 +00:00
|
|
|
public static HandlerList getHandlerList() {
|
2015-09-11 10:09:22 +00:00
|
|
|
return handlers;
|
|
|
|
}
|
2016-03-23 01:41:37 +00:00
|
|
|
|
2015-09-13 04:04:31 +00:00
|
|
|
public PlotPlayer getRater() {
|
2016-03-23 01:41:37 +00:00
|
|
|
return this.rater;
|
2015-09-11 10:09:22 +00:00
|
|
|
}
|
2016-03-23 01:41:37 +00:00
|
|
|
|
2015-09-13 04:04:31 +00:00
|
|
|
public Rating getRating() {
|
2016-03-23 01:41:37 +00:00
|
|
|
return this.rating;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setRating(Rating rating) {
|
|
|
|
this.rating = rating;
|
2015-09-11 10:09:22 +00:00
|
|
|
}
|
2016-03-23 01:41:37 +00:00
|
|
|
|
2015-09-11 10:09:22 +00:00
|
|
|
@Override
|
2015-09-13 04:04:31 +00:00
|
|
|
public HandlerList getHandlers() {
|
2015-09-11 10:09:22 +00:00
|
|
|
return handlers;
|
|
|
|
}
|
2016-03-23 01:41:37 +00:00
|
|
|
|
2018-08-19 21:12:59 +00:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return this.cancelled;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean cancelled) {
|
|
|
|
this.cancelled = cancelled;
|
|
|
|
}
|
2015-09-11 10:09:22 +00:00
|
|
|
}
|