diff --git a/plugin.yml b/plugin.yml index 39c92dd..79461ef 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: GriefPrevention main: me.ryanhamshire.GriefPrevention.GriefPrevention softdepend: [Vault, Multiverse-Core] -version: 4.2 +version: 4.5 commands: abandonclaim: description: Deletes a claim. diff --git a/src/me/ryanhamshire/GriefPrevention/CustomizableMessage.java b/src/me/ryanhamshire/GriefPrevention/CustomizableMessage.java new file mode 100644 index 0000000..4891646 --- /dev/null +++ b/src/me/ryanhamshire/GriefPrevention/CustomizableMessage.java @@ -0,0 +1,15 @@ +package me.ryanhamshire.GriefPrevention; + +public class CustomizableMessage +{ + public Messages id; + public String text; + public String notes; + + public CustomizableMessage(Messages id, String text, String notes) + { + this.id = id; + this.text = text; + this.notes = notes; + } +} \ No newline at end of file diff --git a/src/me/ryanhamshire/GriefPrevention/JoinLeaveAnnouncementTask.java b/src/me/ryanhamshire/GriefPrevention/JoinLeaveAnnouncementTask.java deleted file mode 100644 index 85007f3..0000000 --- a/src/me/ryanhamshire/GriefPrevention/JoinLeaveAnnouncementTask.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - GriefPrevention Server Plugin for Minecraft - Copyright (C) 2011 Ryan Hamshire - - This program 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. - - 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -package me.ryanhamshire.GriefPrevention; - -import org.bukkit.entity.Player; - -//this main thread task takes the output from the RestoreNatureProcessingTask\ -//and updates the world accordingly -class JoinLeaveAnnouncementTask implements Runnable -{ - //player joining or leaving the server - private Player player; - - //message to be displayed - private String message; - - //whether joining or leaving - private boolean joining; - - public JoinLeaveAnnouncementTask(Player player, String message, boolean joining) - { - this.player = player; - this.message = message; - this.joining = joining; - } - - @Override - public void run() - { - //verify the player still has the same online/offline status - if((this.joining && this.player.isOnline() || (!this.joining && !this.player.isOnline()))) - { - Player players [] = GriefPrevention.instance.getServer().getOnlinePlayers(); - for(int i = 0; i < players.length; i++) - { - if(!players[i].equals(this.player)) - { - players[i].sendMessage(this.message); - } - } - - //if left - if(!joining) - { - //drop player data from memory - GriefPrevention.instance.dataStore.clearCachedPlayerData(this.player.getName()); - } - } - } -} diff --git a/src/me/ryanhamshire/GriefPrevention/Messages.java b/src/me/ryanhamshire/GriefPrevention/Messages.java new file mode 100644 index 0000000..0b7964d --- /dev/null +++ b/src/me/ryanhamshire/GriefPrevention/Messages.java @@ -0,0 +1,6 @@ +package me.ryanhamshire.GriefPrevention; + +public enum Messages +{ + RespectingClaims, IgnoringClaims, SuccessfulAbandon, RestoreNatureActivate, RestoreNatureAggressiveActivate, FillModeActive, TransferClaimPermission, TransferClaimMissing, TransferClaimAdminOnly, PlayerNotFound, TransferTopLevel, TransferSuccess, TrustListNoClaim, ClearPermsOwnerOnly, UntrustIndividualAllClaims, UntrustEveryoneAllClaims, NoPermissionTrust, ClearPermissionsOneClaim, UntrustIndividualSingleClaim, OnlySellBlocks, BlockPurchaseCost, ClaimBlockLimit, InsufficientFunds, PurchaseConfirmation, OnlyPurchaseBlocks, BlockSaleValue, NotEnoughBlocksForSale, BlockSaleConfirmation, AdminClaimsMode, BasicClaimsMode, SubdivisionMode, SubdivisionDemo, DeleteClaimMissing, DeletionSubdivisionWarning, DeleteSuccess, CantDeleteAdminClaim, DeleteAllSuccess, NoDeletePermission, AllAdminDeleted, AdjustBlocksSuccess, NotTrappedHere, TrappedOnCooldown, RescuePending, NonSiegeWorld, AlreadySieging, NotSiegableThere, SiegeTooFarAway, NoSiegeDefenseless, AlreadyUnderSiegePlayer, AlreadyUnderSiegeArea, NoSiegeAdminClaim, SiegeOnCooldown, SiegeAlert, SiegeConfirmed, AbandonClaimMissing, NotYourClaim, DeleteTopLevelClaim, AbandonSuccess, CantGrantThatPermission, GrantPermissionNoClaim, GrantPermissionConfirmation, ManageUniversalPermissionsInstruction, ManageOneClaimPermissionsInstruction, CollectivePublic, BuildPermission, ContainersPermission, AccessPermission, PermissionsPermission, LocationCurrentClaim, LocationAllClaims, PvPImmunityStart, SiegeNoDrop, DonateItemsInstruction, ChestFull, DonationSuccess, PlayerTooCloseForFire, TooDeepToClaim, ChestClaimConfirmation, AutomaticClaimNotification, TrustCommandAdvertisement, GoldenShovelAdvertisement, UnprotectedChestWarning, ThatPlayerPvPImmune, CantFightWhileImmune, NoDamageClaimedEntity, ShovelBasicClaimMode, RemainingBlocks, CreativeBasicsDemoAdvertisement, SurvivalBasicsDemoAdvertisement, TrappedChatKeyword, TrappedInstructions, PvPNoDrop, SiegeNoTeleport, BesiegedNoTeleport, SiegeNoContainers, PvPNoContainers, PvPImmunityEnd, NoBedPermission, NoWildernessBuckets, NoLavaNearOtherPlayer, TooFarAway, BlockNotClaimed, BlockClaimed, SiegeNoShovel, RestoreNaturePlayerInChunk, NoCreateClaimPermission, ResizeClaimTooSmall, ResizeNeedMoreBlocks, NoCreativeUnClaim, ClaimResizeSuccess, ResizeFailOverlap, ResizeStart, ResizeFailOverlapSubdivision, SubdivisionStart, CreateSubdivisionOverlap, SubdivisionSuccess, CreateClaimFailOverlap, CreateClaimFailOverlapOtherPlayer, ClaimsDisabledWorld, ClaimStart, NewClaimTooSmall, CreateClaimInsufficientBlocks, AbandonClaimAdvertisement, CreateClaimFailOverlapShort, CreateClaimSuccess, SiegeWinDoorsOpen, RescueAbortedMoved, SiegeDoorsLockedEjection, NoModifyDuringSiege, OnlyOwnersModifyClaims, NoBuildUnderSiege, NoBuildPvP, NoBuildPermission, NonSiegeMaterial, NoOwnerBuildUnderSiege, NoAccessPermission, NoContainersSiege, NoContainersPermission, OwnerNameForAdminClaims, ClaimTooSmallForEntities, TooManyEntitiesInClaim, YouHaveNoClaims, ConfirmFluidRemoval, AutoBanNotify +}