mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-17 21:51:41 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f03b5f5246
@ -0,0 +1,23 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events;
|
||||||
|
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when BSkyBlock is ready to play and all files are loaded
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class BSkyBlockReadyEvent extends Event {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events;
|
||||||
|
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
public class IslandEvent extends Event implements Cancellable{
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
|
private final Island island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
*/
|
||||||
|
public IslandEvent(Island island){
|
||||||
|
this.island = island;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the island involved in this event
|
||||||
|
*/
|
||||||
|
public Island getIsland(){
|
||||||
|
return this.island;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancel) {
|
||||||
|
this.cancelled = cancel;
|
||||||
|
}
|
||||||
|
}
|
@ -1,79 +1,58 @@
|
|||||||
package us.tastybento.bskyblock.api.events.acid;
|
package us.tastybento.bskyblock.api.events.acid;
|
||||||
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when an entity (player and items excluded) receives damage from acid
|
* Fired when an entity (items excluded) receives damage from acid
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class EntityDamageByAcidEvent extends Event implements Cancellable{
|
public class EntityDamageByAcidEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final Entity entity;
|
||||||
private boolean cancelled;
|
|
||||||
|
|
||||||
private Island island;
|
|
||||||
private Entity entity;
|
|
||||||
private double damage;
|
private double damage;
|
||||||
|
|
||||||
public EntityDamageByAcidEvent(Island island, Entity entity, double damage) {
|
public enum Acid { RAIN, WATER };
|
||||||
this.island = island;
|
private final Acid cause;
|
||||||
|
|
||||||
|
public EntityDamageByAcidEvent(Island island, Entity entity, double damage, Acid cause) {
|
||||||
|
super(island);
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
this.damage = damage;
|
this.damage = damage;
|
||||||
|
this.cause = cause;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the island where stands the damaged Entity
|
|
||||||
* @return the island where stands the damaged Entity
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return island;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Entity who is receiving Acid
|
* Gets the Entity who is receiving Acid
|
||||||
* @return the damaged Entity
|
* @return the damaged Entity
|
||||||
*/
|
*/
|
||||||
public Entity getEntity(){
|
public Entity getEntity() {
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the amount of damage that is applied to the Entity
|
* Gets the amount of damage that is applied to the Entity
|
||||||
* @return the amount of damage caused by the acid
|
* @return the amount of damage caused by the acid
|
||||||
*/
|
*/
|
||||||
public double getDamage(){
|
public double getDamage() {
|
||||||
return damage;
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the amount of damage that will be applied to the entity
|
* Sets the amount of damage that will be applied to the entity
|
||||||
* @param damage - the amount of damage caused by the acid
|
* @param damage - the amount of damage caused by the acid
|
||||||
*/
|
*/
|
||||||
public void setDamage(double damage){
|
public void setDamage(double damage) {
|
||||||
this.damage = damage;
|
this.damage = damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
/**
|
||||||
return handlers;
|
* Gets the cause of the acid damage
|
||||||
}
|
* @return the cause of the acid damage
|
||||||
|
*/
|
||||||
@Override
|
public Acid getCause() {
|
||||||
public boolean isCancelled() {
|
return cause;
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,61 +1,28 @@
|
|||||||
package us.tastybento.bskyblock.api.events.acid;
|
package us.tastybento.bskyblock.api.events.acid;
|
||||||
|
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when an item (on the ground) gets destroyed by acid
|
* Fired when an item (on the ground) gets destroyed by acid
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class ItemDestroyByAcidEvent extends Event implements Cancellable{
|
public class ItemDestroyByAcidEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final Item item;
|
||||||
private boolean cancelled;
|
|
||||||
|
|
||||||
private Island island;
|
|
||||||
private Item item;
|
|
||||||
|
|
||||||
public ItemDestroyByAcidEvent(Island island, Item item) {
|
public ItemDestroyByAcidEvent(Island island, Item item) {
|
||||||
this.island = island;
|
super(island);
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the island where stands the destroyed item
|
|
||||||
* @return the island where stands the destroyed item
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return island;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the item which is getting destroyed by Acid
|
* Gets the item which is getting destroyed by Acid
|
||||||
* @return the destroyed item
|
* @return the destroyed item
|
||||||
*/
|
*/
|
||||||
public Item getItem(){
|
public Item getItem() {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,72 +1,40 @@
|
|||||||
package us.tastybento.bskyblock.api.events.acid;
|
package us.tastybento.bskyblock.api.events.acid;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when an ItemStack (water bottle or bucket) is filled with acid
|
* Fired when an ItemStack (water bottle or bucket) is filled with acid
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class ItemFillWithAcidEvent extends Event implements Cancellable{
|
public class ItemFillWithAcidEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final Player player;
|
||||||
private boolean cancelled;
|
private final ItemStack item;
|
||||||
|
|
||||||
private Island island;
|
// TODO: dispenser?
|
||||||
private Player player;
|
|
||||||
private ItemStack item;
|
|
||||||
|
|
||||||
public ItemFillWithAcidEvent(Island island, Player player, ItemStack item) {
|
public ItemFillWithAcidEvent(Island island, Player player, ItemStack item) {
|
||||||
this.island = island;
|
super(island);
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.item = item;
|
this.item = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the island where the event happened
|
|
||||||
* @return the island where the event happened
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return island;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the player who triggered the event
|
* Gets the player who triggered the event
|
||||||
* @return the player who triggered the event
|
* @return the player who triggered the event
|
||||||
*/
|
*/
|
||||||
public Player getPlayer(){
|
public Player getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the item that will be acid-ified
|
* Gets the item that will be acid-ified
|
||||||
* @return the item that will be acid-ified
|
* @return the item that will be acid-ified
|
||||||
*/
|
*/
|
||||||
public ItemStack getItem(){
|
public ItemStack getItem() {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
package us.tastybento.bskyblock.api.events.acid;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired when a player receives damage from acid
|
|
||||||
* @author Poslovitch
|
|
||||||
* @since 4.0
|
|
||||||
*/
|
|
||||||
public class PlayerDamageByAcidEvent extends Event implements Cancellable{
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
private boolean cancelled;
|
|
||||||
|
|
||||||
private Island island;
|
|
||||||
private Player player;
|
|
||||||
private double damage;
|
|
||||||
|
|
||||||
public enum Acid { RAIN, WATER };
|
|
||||||
private Acid cause;
|
|
||||||
|
|
||||||
public PlayerDamageByAcidEvent(Island island, Player player, double damage, Acid cause) {
|
|
||||||
this.island = island;
|
|
||||||
this.player = player;
|
|
||||||
this.damage = damage;
|
|
||||||
this.cause = cause;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the island where stands the damaged Player
|
|
||||||
* @return the island where stands the damaged Player
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return island;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the Player who is receiving Acid
|
|
||||||
* @return the damaged Player
|
|
||||||
*/
|
|
||||||
public Player getPlayer(){
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the amount of damage that is applied to the Player
|
|
||||||
* @return the amount of damage caused by the acid
|
|
||||||
*/
|
|
||||||
public double getDamage(){
|
|
||||||
return damage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the amount of damage that will be applied to the Player
|
|
||||||
* @param damage - the amount of damage caused by the acid
|
|
||||||
*/
|
|
||||||
public void setDamage(double damage){
|
|
||||||
this.damage = damage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the cause of the acid damage
|
|
||||||
* @return the cause of the acid damage
|
|
||||||
*/
|
|
||||||
public Acid getCause(){
|
|
||||||
return cause;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +1,28 @@
|
|||||||
package us.tastybento.bskyblock.api.events.acid;
|
package us.tastybento.bskyblock.api.events.acid;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when a player drinks acid and... DIES
|
* Fired when a player drinks acid and... DIES
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class PlayerDrinkAcidEvent extends Event implements Cancellable{
|
public class PlayerDrinkAcidEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final Player player;
|
||||||
private boolean cancelled;
|
|
||||||
|
|
||||||
private Island island;
|
|
||||||
private Player player;
|
|
||||||
|
|
||||||
public PlayerDrinkAcidEvent(Island island, Player player) {
|
public PlayerDrinkAcidEvent(Island island, Player player) {
|
||||||
this.island = island;
|
super(island);
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the island where stands the killed player
|
|
||||||
* @return the island where stands the killed player
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return island;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the player which is getting killed by its stupid thirsty
|
* Gets the player which is getting killed by its stupid thirsty
|
||||||
* @return the killed player
|
* @return the killed player
|
||||||
*/
|
*/
|
||||||
public Player getPlayer(){
|
public Player getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return handlers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when the owner of an island changes
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
public class IslandChangeOwnerEvent extends IslandEvent {
|
||||||
|
private final UUID oldOwner, newOwner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param oldOwner
|
||||||
|
* @param newOwner
|
||||||
|
*/
|
||||||
|
public IslandChangeOwnerEvent(Island island, UUID oldOwner, UUID newOwner) {
|
||||||
|
super(island);
|
||||||
|
this.oldOwner = oldOwner;
|
||||||
|
this.newOwner = newOwner;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the old owner
|
||||||
|
*/
|
||||||
|
public UUID getOldOwner() {
|
||||||
|
return oldOwner;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the new owner
|
||||||
|
*/
|
||||||
|
public UUID getNewOwner() {
|
||||||
|
return newOwner;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player starts a new island
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandCreateEvent extends IslandEvent {
|
||||||
|
private final Player player;
|
||||||
|
//private final Schematic schematic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
* @param schematic
|
||||||
|
*/
|
||||||
|
public IslandCreateEvent(Island island, Player player/*, Schematic schematic*/) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
//this.schematic = schematic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public Player getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
// /** TODO: schematics
|
||||||
|
// * @return the schematicName
|
||||||
|
// */
|
||||||
|
// public Schematic getSchematicName() {
|
||||||
|
// return schematic;
|
||||||
|
// }
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired before an island is deleted.
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandDeleteEvent extends IslandEvent {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
*/
|
||||||
|
public IslandDeleteEvent(Island island) {
|
||||||
|
super(island);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player enters an island's area
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandEnterEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
private final Location location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called to create the event
|
||||||
|
* @param island - island the player is entering
|
||||||
|
* @param player
|
||||||
|
* @param location - Location of where the player entered the island or tried to enter
|
||||||
|
*/
|
||||||
|
public IslandEnterEvent(Island island, UUID player, Location location) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location of where the player entered the island or tried to enter
|
||||||
|
* @return the location
|
||||||
|
*/
|
||||||
|
public Location getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player exits an island's protected area
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandExitEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
private final Location location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island that the player is leaving
|
||||||
|
* @param player
|
||||||
|
* @param location - Location of where the player exited the island's protected area
|
||||||
|
*/
|
||||||
|
public IslandExitEvent(Island island, UUID player, Location location) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location of where the player exited the island's protected area
|
||||||
|
* @return the location
|
||||||
|
*/
|
||||||
|
public Location getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player joins an existing island.
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandJoinEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public IslandJoinEvent(Island island, UUID player) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method suggested by Exloki.
|
||||||
|
* Equals to <code>getIsland().getOwner();</code>
|
||||||
|
* @return the owner of the joined island
|
||||||
|
*/
|
||||||
|
public UUID getNewIslandOwner() {
|
||||||
|
return getIsland().getOwner();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player leaves an existing island.
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandLeaveEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public IslandLeaveEvent(Island island, UUID player) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method suggested by Exloki.
|
||||||
|
* Equals to <code>getIsland().getOwner();</code>
|
||||||
|
* @return the owner of the left island
|
||||||
|
*/
|
||||||
|
public UUID getOldIslandOwner() {
|
||||||
|
return getIsland().getOwner();
|
||||||
|
}
|
||||||
|
}
|
@ -1,53 +1,31 @@
|
|||||||
package us.tastybento.bskyblock.api.events.island;
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired when an island is going to be locked.
|
* This event is fired when an island is going to be locked.
|
||||||
* <p>
|
* <p>
|
||||||
* Cancelling this event will result in keeping the island unlocked.
|
* Cancelling this event will result in keeping the island unlocked.
|
||||||
|
*
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class IslandLockEvent extends Event implements Cancellable{
|
public class IslandLockEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final CommandSender locker;
|
||||||
private final Island island;
|
|
||||||
private boolean cancelled;
|
/**
|
||||||
|
* @param island
|
||||||
/**
|
* @param locker
|
||||||
* @param island
|
*/
|
||||||
*/
|
public IslandLockEvent(Island island, CommandSender locker) {
|
||||||
public IslandLockEvent(Island island){
|
super(island);
|
||||||
this.island = island;
|
this.locker = locker;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the locked island
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return this.island;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
public CommandSender getLocker() {
|
||||||
return handlers;
|
return locker;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,32 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is fired when a player resets an island
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class IslandResetEvent extends IslandEvent {
|
||||||
|
private final Player player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public IslandResetEvent(Island island, Player player) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public Player getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
}
|
@ -1,53 +1,31 @@
|
|||||||
package us.tastybento.bskyblock.api.events.island;
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired when an island is going to be unlocked.
|
* This event is fired when an island is going to be unlocked.
|
||||||
* <p>
|
* <p>
|
||||||
* Cancelling this event will result in keeping the island locked.
|
* Cancelling this event will result in keeping the island locked.
|
||||||
|
*
|
||||||
* @author Poslovitch
|
* @author Poslovitch
|
||||||
* @since 4.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class IslandUnlockEvent extends Event implements Cancellable{
|
public class IslandUnlockEvent extends IslandEvent {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private final CommandSender unlocker;
|
||||||
private final Island island;
|
|
||||||
private boolean cancelled;
|
/**
|
||||||
|
* @param island
|
||||||
/**
|
* @param unlocker
|
||||||
* @param island
|
*/
|
||||||
*/
|
public IslandUnlockEvent(Island island, CommandSender unlocker) {
|
||||||
public IslandUnlockEvent(Island island){
|
super(island);
|
||||||
this.island = island;
|
this.unlocker = unlocker;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the locked island
|
|
||||||
*/
|
|
||||||
public Island getIsland(){
|
|
||||||
return this.island;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HandlerList getHandlers() {
|
|
||||||
return handlers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HandlerList getHandlerList() {
|
public CommandSender getUnlocker(){
|
||||||
return handlers;
|
return unlocker;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean isCancelled() {
|
|
||||||
return cancelled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCancelled(boolean cancel) {
|
|
||||||
this.cancelled = cancel;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,55 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is fired when a player changes a setting on his island
|
||||||
|
* <p>
|
||||||
|
* Canceling this event will result in canceling the change.
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class SettingChangeEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
private final SettingsFlag editedSetting;
|
||||||
|
private final boolean setTo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
* @param editedSetting
|
||||||
|
* @param setTo
|
||||||
|
*/
|
||||||
|
public SettingChangeEvent(Island island, UUID player, SettingsFlag editedSetting, boolean setTo) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.editedSetting = editedSetting;
|
||||||
|
this.setTo = setTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the edited setting
|
||||||
|
*/
|
||||||
|
public SettingsFlag getSetting() {
|
||||||
|
return this.editedSetting;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return enabled/disabled
|
||||||
|
*/
|
||||||
|
public boolean getSetTo() {
|
||||||
|
return this.setTo;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.purge;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is fired before an island is going to be purged.
|
||||||
|
* Canceling this event will prevent the plugin to remove the island.
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class PurgeDeleteIslandEvent extends IslandEvent {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called to create the event
|
||||||
|
* @param island - island that will be removed
|
||||||
|
*/
|
||||||
|
public PurgeDeleteIslandEvent(Island island) {
|
||||||
|
super(island);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.purge;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is fired when islands to remove have been chosen and before starting to remove them.
|
||||||
|
* You can remove or add islands to remove.
|
||||||
|
* Canceling this event will cancel the purge
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class PurgeStartEvent extends Event implements Cancellable {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
|
private final UUID user;
|
||||||
|
private List<UUID> islandsList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called to create the event
|
||||||
|
* @param user - the UUID of the player who launched the purge, may be null if purge is launched using the console.
|
||||||
|
* @param islandsList - the list of islands to remove, based on their leader's UUID
|
||||||
|
*/
|
||||||
|
public PurgeStartEvent(UUID user, List<UUID> islandsList) {
|
||||||
|
this.user = user;
|
||||||
|
this.islandsList = islandsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the user who launched the purge, may be null if purge is launched using the console.
|
||||||
|
*/
|
||||||
|
public UUID getUser( ){
|
||||||
|
return this.user;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the list of islands to remove, based on their leader's UUID
|
||||||
|
*/
|
||||||
|
public List<UUID> getIslandsList() {
|
||||||
|
return this.islandsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to directly add an island owner's UUID to the list
|
||||||
|
* @param - the owner's UUID from the island to remove
|
||||||
|
*/
|
||||||
|
public void add(UUID islandOwner) {
|
||||||
|
if(!this.islandsList.contains(islandOwner)) islandsList.add(islandOwner);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method to directly remove an island owner's UUID to the list
|
||||||
|
* @param - the owner's UUID from the island to remove
|
||||||
|
*/
|
||||||
|
public void remove(UUID islandOwner) {
|
||||||
|
if(this.islandsList.contains(islandOwner)) islandsList.remove(islandOwner);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace the island list
|
||||||
|
* @param - a new island owners' UUIDs list
|
||||||
|
*/
|
||||||
|
public void setIslandsList(List<UUID> islandsList) {
|
||||||
|
this.islandsList = islandsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancel) {
|
||||||
|
this.cancelled = cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.team;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player joins an island team as a coop member
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class CoopJoinEvent extends IslandEvent {
|
||||||
|
private final UUID player, inviter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
* @param inviter
|
||||||
|
*/
|
||||||
|
public CoopJoinEvent(Island island, UUID player, UUID inviter) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.inviter = inviter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The UUID of the player who were coop'd
|
||||||
|
* @return the coop'd
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The UUID of the player who invited the player to join the island
|
||||||
|
* @return the inviter
|
||||||
|
*/
|
||||||
|
public UUID getInviter() {
|
||||||
|
return inviter;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.team;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player leaves an island coop
|
||||||
|
*
|
||||||
|
* @author tastybento
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class CoopLeaveEvent extends IslandEvent {
|
||||||
|
private final UUID player, expeller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Note that not all coop leaving events can be cancelled because they could be due to bigger events than
|
||||||
|
* coop, e.g., an island being reset.
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
* @param expeller
|
||||||
|
*/
|
||||||
|
public CoopLeaveEvent(Island island, UUID player, UUID expeller) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.expeller = expeller;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The UUID of the player who left
|
||||||
|
* @return the player who left the coop
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the expelling player
|
||||||
|
*/
|
||||||
|
public UUID getExpeller() {
|
||||||
|
return expeller;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.team;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player accepts an invite to join a team.
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class PlayerAcceptInviteEvent extends Event {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private final Player player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public PlayerAcceptInviteEvent(Player player) {
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public Player getPlayer() {
|
||||||
|
return this.player;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* This file is part of ASkyBlock.
|
||||||
|
* <p>
|
||||||
|
* ASkyBlock is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
* <p>
|
||||||
|
* ASkyBlock is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* <p>
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with ASkyBlock. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package us.tastybento.bskyblock.api.events.team;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when a player rejects an invite to join a team.
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class PlayerRejectInviteEvent extends Event {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private final Player player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public PlayerRejectInviteEvent(Player player) {
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player
|
||||||
|
*/
|
||||||
|
public Player getPlayer() {
|
||||||
|
return this.player;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package us.tastybento.bskyblock.api.events.team;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.events.IslandEvent;
|
||||||
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This event is fired when a player talks in TeamChat
|
||||||
|
*
|
||||||
|
* @author Poslovitch
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public class TeamChatEvent extends IslandEvent {
|
||||||
|
private final UUID player;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param island
|
||||||
|
* @param player
|
||||||
|
* @param message
|
||||||
|
*/
|
||||||
|
public TeamChatEvent(Island island, UUID player, String message) {
|
||||||
|
super(island);
|
||||||
|
this.player = player;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the player who talked
|
||||||
|
*/
|
||||||
|
public UUID getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the message that the player is attempting to send.
|
||||||
|
* @return the message
|
||||||
|
*/
|
||||||
|
public String getMessage() {
|
||||||
|
return this.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the message that the player will send.
|
||||||
|
* @param the message to send
|
||||||
|
*/
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
@ -684,7 +684,7 @@ public class Island extends DataObject {
|
|||||||
public void setLocked(boolean locked){
|
public void setLocked(boolean locked){
|
||||||
if(locked){
|
if(locked){
|
||||||
// Lock the island
|
// Lock the island
|
||||||
IslandLockEvent event = new IslandLockEvent(this);
|
IslandLockEvent event = new IslandLockEvent(this, null); // TODO: Maybe a custom CommandSender for BSkyBlock ?
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if(!event.isCancelled()){
|
if(!event.isCancelled()){
|
||||||
@ -692,7 +692,7 @@ public class Island extends DataObject {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Unlock the island
|
// Unlock the island
|
||||||
IslandUnlockEvent event = new IslandUnlockEvent(this);
|
IslandUnlockEvent event = new IslandUnlockEvent(this, null);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if(!event.isCancelled()){
|
if(!event.isCancelled()){
|
||||||
|
@ -1,4 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <code>TAG_Byte_Array</code> tag.
|
* The <code>TAG_Byte_Array</code> tag.
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,60 +1,118 @@
|
|||||||
/*
|
|
||||||
* WorldEdit, a Minecraft world manipulation toolkit
|
|
||||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
||||||
* Copyright (C) WorldEdit team and contributors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU Lesser General Public License as published by the
|
|
||||||
* Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
//@formatter:off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010 Graham Edgecombe
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name of the JNBT team nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from
|
||||||
|
* this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//@formatter:on
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@code TAG_Int_Array} tag.
|
* The <code>TAG_Byte_Array</code> tag.
|
||||||
|
*
|
||||||
|
* @author Jocopa3
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public final class IntArrayTag extends Tag {
|
public final class IntArrayTag extends Tag {
|
||||||
|
|
||||||
private final int[] value;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the tag with an empty name.
|
* The value.
|
||||||
*
|
|
||||||
* @param value the value of the tag
|
|
||||||
*/
|
*/
|
||||||
public IntArrayTag(String name, int[] value) {
|
private final int[] value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the tag.
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* The name.
|
||||||
|
* @param value
|
||||||
|
* The value.
|
||||||
|
*/
|
||||||
|
public IntArrayTag(final String name, final int[] value) {
|
||||||
|
|
||||||
super(name);
|
super(name);
|
||||||
checkNotNull(value);
|
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getValue() {
|
public int[] getValue() {
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder hex = new StringBuilder();
|
|
||||||
for (int b : value) {
|
final StringBuilder integers = new StringBuilder();
|
||||||
String hexDigits = Integer.toHexString(b).toUpperCase();
|
for (final int b : value) {
|
||||||
if (hexDigits.length() == 1) {
|
integers.append(b).append(" ");
|
||||||
hex.append("0");
|
|
||||||
}
|
|
||||||
hex.append(hexDigits).append(" ");
|
|
||||||
}
|
}
|
||||||
return "TAG_Int_Array(" + hex + ")";
|
final String name = getName();
|
||||||
|
String append = "";
|
||||||
|
if ((name != null) && !name.equals("")) {
|
||||||
|
append = "(\"" + getName() + "\")";
|
||||||
|
}
|
||||||
|
return "TAG_Int_Array" + append + ": " + integers.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#hashCode()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
|
||||||
|
final int prime = 31;
|
||||||
|
int result = super.hashCode();
|
||||||
|
result = (prime * result) + Arrays.hashCode(value);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see java.lang.Object#equals(java.lang.Object)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object obj) {
|
||||||
|
|
||||||
|
if (this == obj) { return true; }
|
||||||
|
if (!super.equals(obj)) { return false; }
|
||||||
|
if (!(obj instanceof IntArrayTag)) { return false; }
|
||||||
|
final IntArrayTag other = (IntArrayTag) obj;
|
||||||
|
if (!Arrays.equals(value, other.value)) { return false; }
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* JNBT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Graham Edgecombe
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the JNBT team nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
package us.tastybento.org.jnbt;
|
package us.tastybento.org.jnbt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user