reformat code

- Lots of tabs to spaces going on
- That's a lot of changes!

#63
This commit is contained in:
RoboMWM
2020-06-08 21:57:55 -07:00
parent bc05440617
commit 40f554d386
63 changed files with 12745 additions and 12750 deletions
@@ -14,11 +14,15 @@ public class AccrueClaimBlocksEvent extends Event
{
// Custom Event Requirements
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList() {
public static HandlerList getHandlerList()
{
return handlers;
}
@Override
public HandlerList getHandlers() {
public HandlerList getHandlers()
{
return handlers;
}
@@ -30,7 +34,6 @@ public class AccrueClaimBlocksEvent extends Event
/**
* @param player Player receiving accruals
* @param blocksToAccrue Blocks to accrue
*
* @deprecated Use {@link #AccrueClaimBlocksEvent(Player, int, boolean)} instead
*/
public AccrueClaimBlocksEvent(Player player, int blocksToAccrue)
@@ -67,7 +70,8 @@ public class AccrueClaimBlocksEvent extends Event
/**
* @return whether the player was detected as idle (used for idle accrual percentage)
*/
public boolean isIdle() {
public boolean isIdle()
{
return this.isIdle;
}
@@ -78,6 +82,7 @@ public class AccrueClaimBlocksEvent extends Event
/**
* Modify the amount of claim blocks to deliver to the player for this 10 minute interval
*
* @param blocksToAccrue blocks to deliver
*/
public void setBlocksToAccrue(int blocksToAccrue)
@@ -87,6 +92,7 @@ public class AccrueClaimBlocksEvent extends Event
/**
* Similar to setBlocksToAccrue(int), but automatically converting from a per-hour rate value to a 10-minute rate value
*
* @param blocksToAccruePerHour the per-hour rate of blocks to deliver
*/
@@ -13,11 +13,13 @@ import org.bukkit.event.HandlerList;
* Created by Narimm on 5/08/2018.
*/
public class ClaimCreatedEvent extends Event implements Cancellable {
public class ClaimCreatedEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList() {
public static HandlerList getHandlerList()
{
return handlers;
}
@@ -27,23 +29,27 @@ public class ClaimCreatedEvent extends Event implements Cancellable {
private boolean cancelled = false;
public ClaimCreatedEvent(Claim claim, CommandSender creator) {
public ClaimCreatedEvent(Claim claim, CommandSender creator)
{
this.claim = claim;
this.creator = creator;
}
@Override
public HandlerList getHandlers() {
public HandlerList getHandlers()
{
return handlers;
}
@Override
public boolean isCancelled() {
public boolean isCancelled()
{
return cancelled;
}
@Override
public void setCancelled(boolean b) {
public void setCancelled(boolean b)
{
this.cancelled = b;
}
@@ -52,7 +58,8 @@ public class ClaimCreatedEvent extends Event implements Cancellable {
*
* @return Claim
*/
public Claim getClaim() {
public Claim getClaim()
{
return claim;
}
@@ -61,7 +68,8 @@ public class ClaimCreatedEvent extends Event implements Cancellable {
*
* @return the CommandSender
*/
public CommandSender getCreator() {
public CommandSender getCreator()
{
return creator;
}
}
@@ -1,43 +1,46 @@
package me.ryanhamshire.GriefPrevention.events;
import me.ryanhamshire.GriefPrevention.Claim;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* This event gets called whenever a claim is going to be deleted. This event is
* not called when a claim is resized.
*
*
* @author Tux2
*
*/
public class ClaimDeletedEvent extends Event{
public class ClaimDeletedEvent extends Event
{
// Custom Event Requirements
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList() {
public static HandlerList getHandlerList()
{
return handlers;
}
private Claim claim;
public ClaimDeletedEvent(Claim claim) {
public ClaimDeletedEvent(Claim claim)
{
this.claim = claim;
}
/**
* Gets the claim to be deleted.
*
*
* @return
*/
public Claim getClaim() {
public Claim getClaim()
{
return claim;
}
@Override
public HandlerList getHandlers() {
public HandlerList getHandlers()
{
return handlers;
}
}
@@ -1,7 +1,6 @@
package me.ryanhamshire.GriefPrevention.events;
import me.ryanhamshire.GriefPrevention.Claim;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -11,7 +10,7 @@ public class ClaimExpirationEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false;
public static HandlerList getHandlerList()
{
return handlers;
@@ -34,13 +33,13 @@ public class ClaimExpirationEvent extends Event implements Cancellable
{
return handlers;
}
@Override
public boolean isCancelled()
{
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
@@ -11,24 +11,28 @@ import org.bukkit.event.HandlerList;
* a claim has changed. The CommandSender can be null in the event that the modification is called by the plugin itself.
* Created by Narimm on 5/08/2018.
*/
public class ClaimModifiedEvent extends Event {
public class ClaimModifiedEvent extends Event
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList() {
public static HandlerList getHandlerList()
{
return handlers;
}
private final Claim claim;
private CommandSender modifier;
public ClaimModifiedEvent(Claim claim, CommandSender modifier) {
public ClaimModifiedEvent(Claim claim, CommandSender modifier)
{
this.claim = claim;
this.modifier = modifier;
}
@Override
public HandlerList getHandlers() {
public HandlerList getHandlers()
{
return handlers;
}
@@ -37,7 +41,8 @@ public class ClaimModifiedEvent extends Event {
*
* @return the claim
*/
public Claim getClaim() {
public Claim getClaim()
{
return claim;
}
@@ -46,7 +51,8 @@ public class ClaimModifiedEvent extends Event {
*
* @return the CommandSender or null
*/
public CommandSender getModifier() {
public CommandSender getModifier()
{
return modifier;
}
}
@@ -34,8 +34,8 @@ public class PlayerKickBanEvent extends Event
/**
* @param player Player getting kicked and/or banned
* @param reason Reason message for kick/ban
* @param source What caused the kick/ban
* @param ban True if player is getting banned
* @param source What caused the kick/ban
* @param ban True if player is getting banned
*/
public PlayerKickBanEvent(Player player, String reason, String source, boolean ban)
{
@@ -10,7 +10,7 @@ public class PreventBlockBreakEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false;
private BlockBreakEvent innerEvent;
private BlockBreakEvent innerEvent;
public static HandlerList getHandlerList()
{
@@ -21,7 +21,7 @@ public class PreventBlockBreakEvent extends Event implements Cancellable
{
this.innerEvent = innerEvent;
}
public BlockBreakEvent getInnerEvent()
{
return this.innerEvent;
@@ -32,13 +32,13 @@ public class PreventBlockBreakEvent extends Event implements Cancellable
{
return handlers;
}
@Override
public boolean isCancelled()
{
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
@@ -1,7 +1,6 @@
package me.ryanhamshire.GriefPrevention.events;
import me.ryanhamshire.GriefPrevention.Claim;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -34,13 +33,13 @@ public class PreventPvPEvent extends Event implements Cancellable
{
return handlers;
}
@Override
public boolean isCancelled()
{
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
@@ -1,7 +1,6 @@
package me.ryanhamshire.GriefPrevention.events;
import me.ryanhamshire.GriefPrevention.Claim;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@@ -34,13 +33,13 @@ public class ProtectDeathDropsEvent extends Event implements Cancellable
{
return handlers;
}
@Override
public boolean isCancelled()
{
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
@@ -1,7 +1,6 @@
package me.ryanhamshire.GriefPrevention.events;
import me.ryanhamshire.GriefPrevention.Claim;
import org.bukkit.Location;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
@@ -46,13 +45,13 @@ public class SaveTrappedPlayerEvent extends Event implements Cancellable
{
return handlers;
}
@Override
public boolean isCancelled()
{
return this.cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
@@ -1,110 +1,119 @@
package me.ryanhamshire.GriefPrevention.events;
import java.util.ArrayList;
import java.util.List;
import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.ClaimPermission;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.ClaimPermission;
import java.util.ArrayList;
import java.util.List;
/**
* This event is thrown when the trust is changed in one or more claims
*
* @author roinujnosde
*
* @author roinujnosde
*/
public class TrustChangedEvent extends Event implements Cancellable {
public class TrustChangedEvent extends Event implements Cancellable
{
private static final HandlerList handlers = new HandlerList();
private final Player changer;
private final List<Claim> claims;
private final ClaimPermission claimPermission;
private final boolean given;
private final String identifier;
private boolean cancelled;
public TrustChangedEvent(Player changer, List<Claim> claims, ClaimPermission claimPermission, boolean given,
String identifier) {
super();
this.changer = changer;
this.claims = claims;
this.claimPermission = claimPermission;
this.given = given;
this.identifier = identifier;
}
public TrustChangedEvent(Player changer, Claim claim, ClaimPermission claimPermission, boolean given, String identifier) {
this.changer = changer;
claims = new ArrayList<>();
claims.add(claim);
this.claimPermission = claimPermission;
this.given = given;
this.identifier = identifier;
}
public TrustChangedEvent(Player changer, List<Claim> claims, ClaimPermission claimPermission, boolean given,
String identifier)
{
super();
this.changer = changer;
this.claims = claims;
this.claimPermission = claimPermission;
this.given = given;
this.identifier = identifier;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
/**
* Gets who made the change
*
* @return the changer
*/
public Player getChanger() {
return changer;
}
public TrustChangedEvent(Player changer, Claim claim, ClaimPermission claimPermission, boolean given, String identifier)
{
this.changer = changer;
claims = new ArrayList<>();
claims.add(claim);
this.claimPermission = claimPermission;
this.given = given;
this.identifier = identifier;
}
/**
* Gets the changed claims
*
* @return the changed claims
*/
public List<Claim> getClaims() {
return claims;
}
@Override
public HandlerList getHandlers()
{
return handlers;
}
/**
* Gets the claim permission (null if the permission is being taken)
*
* @return the claim permission
*/
public ClaimPermission getClaimPermission() {
return claimPermission;
}
/**
* Gets who made the change
*
* @return the changer
*/
public Player getChanger()
{
return changer;
}
/**
* Checks if the trust is being given
*
* @return true if given, false if taken
*/
public boolean isGiven() {
return given;
}
/**
* Gets the changed claims
*
* @return the changed claims
*/
public List<Claim> getClaims()
{
return claims;
}
/**
* Gets the identifier of the receiver of this action
* Can be: "public", "all", a UUID, a permission
*
* @return the identifier
*/
public String getIdentifier() {
return identifier;
}
/**
* Gets the claim permission (null if the permission is being taken)
*
* @return the claim permission
*/
public ClaimPermission getClaimPermission()
{
return claimPermission;
}
@Override
public boolean isCancelled() {
return cancelled;
}
/**
* Checks if the trust is being given
*
* @return true if given, false if taken
*/
public boolean isGiven()
{
return given;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
/**
* Gets the identifier of the receiver of this action
* Can be: "public", "all", a UUID, a permission
*
* @return the identifier
*/
public String getIdentifier()
{
return identifier;
}
@Override
public boolean isCancelled()
{
return cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
this.cancelled = cancelled;
}
}
@@ -11,7 +11,8 @@ import java.util.Collections;
/**
* Called when GriefPrevention is sending claim visuals to a player
*/
public class VisualizationEvent extends PlayerEvent {
public class VisualizationEvent extends PlayerEvent
{
private static final HandlerList handlers = new HandlerList();
private final Collection<Claim> claims;
private final boolean showSubdivides;
@@ -22,7 +23,8 @@ public class VisualizationEvent extends PlayerEvent {
* @param player Player receiving visuals
* @param claim The claim being visualized (with subdivides), or null if visuals being removed
*/
public VisualizationEvent(Player player, Claim claim) {
public VisualizationEvent(Player player, Claim claim)
{
super(player);
this.claims = Collections.singleton(claim);
this.showSubdivides = true;
@@ -34,7 +36,8 @@ public class VisualizationEvent extends PlayerEvent {
* @param player Player receiving visuals
* @param claims Claims being visualized (without subdivides)
*/
public VisualizationEvent(Player player, Collection<Claim> claims) {
public VisualizationEvent(Player player, Collection<Claim> claims)
{
super(player);
this.claims = claims;
this.showSubdivides = false;
@@ -45,7 +48,8 @@ public class VisualizationEvent extends PlayerEvent {
*
* @return Claims being visualized
*/
public Collection<Claim> getClaims() {
public Collection<Claim> getClaims()
{
return claims;
}
@@ -54,16 +58,19 @@ public class VisualizationEvent extends PlayerEvent {
*
* @return True if subdivide claims are being shown
*/
public boolean showSubdivides() {
public boolean showSubdivides()
{
return showSubdivides;
}
@Override
public HandlerList getHandlers() {
public HandlerList getHandlers()
{
return handlers;
}
public static HandlerList getHandlerList() {
public static HandlerList getHandlerList()
{
return handlers;
}
}
@@ -1,5 +1,5 @@
/**
*
* @author Ryan
*/
/**
* @author Ryan