TF-PlotSquared/Bukkit/src/main/java/com/plotsquared/bukkit/events/PlotRateEvent.java

53 lines
1.3 KiB
Java
Raw Normal View History

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