4.5
This commit is contained in:
parent
7e6c06289b
commit
03c920f568
|
|
@ -1,7 +1,7 @@
|
||||||
name: GriefPrevention
|
name: GriefPrevention
|
||||||
main: me.ryanhamshire.GriefPrevention.GriefPrevention
|
main: me.ryanhamshire.GriefPrevention.GriefPrevention
|
||||||
softdepend: [Vault, Multiverse-Core]
|
softdepend: [Vault, Multiverse-Core]
|
||||||
version: 4.2
|
version: 4.5
|
||||||
commands:
|
commands:
|
||||||
abandonclaim:
|
abandonclaim:
|
||||||
description: Deletes a claim.
|
description: Deletes a claim.
|
||||||
|
|
|
||||||
15
src/me/ryanhamshire/GriefPrevention/CustomizableMessage.java
Normal file
15
src/me/ryanhamshire/GriefPrevention/CustomizableMessage.java
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
6
src/me/ryanhamshire/GriefPrevention/Messages.java
Normal file
6
src/me/ryanhamshire/GriefPrevention/Messages.java
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user