13.5.2 Changes
Various, see changelogs on dev.bukkit.org or spigotmc.org.
This commit is contained in:
parent
b61de60e63
commit
89419ebade
|
|
@ -3,7 +3,7 @@ main: me.ryanhamshire.GriefPrevention.GriefPrevention
|
||||||
softdepend: [Vault, Multiverse-Core, My Worlds, MystCraft, Transporter, TheUnderground, WorldGuard, WorldEdit, RoyalCommands]
|
softdepend: [Vault, Multiverse-Core, My Worlds, MystCraft, Transporter, TheUnderground, WorldGuard, WorldEdit, RoyalCommands]
|
||||||
dev-url: http://dev.bukkit.org/server-mods/grief-prevention
|
dev-url: http://dev.bukkit.org/server-mods/grief-prevention
|
||||||
loadbefore: [TheUnderground]
|
loadbefore: [TheUnderground]
|
||||||
version: 13.5.1
|
version: 13.5.2
|
||||||
commands:
|
commands:
|
||||||
abandonclaim:
|
abandonclaim:
|
||||||
description: Deletes a claim.
|
description: Deletes a claim.
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,6 @@ public enum CustomLogEntryTypes
|
||||||
SuspiciousActivity,
|
SuspiciousActivity,
|
||||||
AdminActivity,
|
AdminActivity,
|
||||||
Debug,
|
Debug,
|
||||||
Exception
|
Exception,
|
||||||
|
MutedChat
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ class CustomLogger
|
||||||
if(entryType == CustomLogEntryTypes.SuspiciousActivity && !GriefPrevention.instance.config_logs_suspiciousEnabled) return false;
|
if(entryType == CustomLogEntryTypes.SuspiciousActivity && !GriefPrevention.instance.config_logs_suspiciousEnabled) return false;
|
||||||
if(entryType == CustomLogEntryTypes.AdminActivity && !GriefPrevention.instance.config_logs_adminEnabled) return false;
|
if(entryType == CustomLogEntryTypes.AdminActivity && !GriefPrevention.instance.config_logs_adminEnabled) return false;
|
||||||
if(entryType == CustomLogEntryTypes.Debug && !GriefPrevention.instance.config_logs_debugEnabled) return false;
|
if(entryType == CustomLogEntryTypes.Debug && !GriefPrevention.instance.config_logs_debugEnabled) return false;
|
||||||
|
if(entryType == CustomLogEntryTypes.MutedChat && !GriefPrevention.instance.config_logs_mutedChatEnabled) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,13 @@ import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Monster;
|
import org.bukkit.entity.Monster;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
|
import org.bukkit.entity.Rabbit;
|
||||||
|
import org.bukkit.entity.Rabbit.Type;
|
||||||
import org.bukkit.entity.Tameable;
|
import org.bukkit.entity.Tameable;
|
||||||
import org.bukkit.entity.ThrownPotion;
|
import org.bukkit.entity.ThrownPotion;
|
||||||
import org.bukkit.entity.Villager;
|
import org.bukkit.entity.Villager;
|
||||||
import org.bukkit.entity.WaterMob;
|
import org.bukkit.entity.WaterMob;
|
||||||
|
import org.bukkit.entity.minecart.ExplosiveMinecart;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
@ -561,6 +563,13 @@ public class EntityEventHandler implements Listener
|
||||||
//monsters are never protected
|
//monsters are never protected
|
||||||
if(event.getEntity() instanceof Monster) return;
|
if(event.getEntity() instanceof Monster) return;
|
||||||
|
|
||||||
|
//nor are killer bunnies
|
||||||
|
if(event.getEntity() instanceof Rabbit)
|
||||||
|
{
|
||||||
|
Rabbit rabbit = (Rabbit)event.getEntity();
|
||||||
|
if(rabbit.getRabbitType() == Rabbit.Type.THE_KILLER_BUNNY) return;
|
||||||
|
}
|
||||||
|
|
||||||
//horse protections can be disabled
|
//horse protections can be disabled
|
||||||
if(event.getEntity() instanceof Horse && !GriefPrevention.instance.config_claims_protectHorses) return;
|
if(event.getEntity() instanceof Horse && !GriefPrevention.instance.config_claims_protectHorses) return;
|
||||||
|
|
||||||
|
|
@ -791,7 +800,7 @@ public class EntityEventHandler implements Listener
|
||||||
PlayerData playerData = null;
|
PlayerData playerData = null;
|
||||||
|
|
||||||
//if not a player or an explosive, allow
|
//if not a player or an explosive, allow
|
||||||
if(attacker == null && damageSource != null && !(damageSource instanceof Projectile) && damageSource.getType() != EntityType.CREEPER && !(damageSource instanceof Explosive))
|
if(attacker == null && damageSource != null && !(damageSource instanceof Projectile) && damageSource.getType() != EntityType.CREEPER && !(damageSource instanceof Explosive) && !(damageSource instanceof ExplosiveMinecart))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ public class GriefPrevention extends JavaPlugin
|
||||||
public boolean config_logs_suspiciousEnabled;
|
public boolean config_logs_suspiciousEnabled;
|
||||||
public boolean config_logs_adminEnabled;
|
public boolean config_logs_adminEnabled;
|
||||||
public boolean config_logs_debugEnabled;
|
public boolean config_logs_debugEnabled;
|
||||||
|
public boolean config_logs_mutedChatEnabled;
|
||||||
|
|
||||||
//ban management plugin interop settings
|
//ban management plugin interop settings
|
||||||
public boolean config_ban_useCommand;
|
public boolean config_ban_useCommand;
|
||||||
|
|
@ -727,6 +728,7 @@ public class GriefPrevention extends JavaPlugin
|
||||||
this.config_logs_suspiciousEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Suspicious Activity", true);
|
this.config_logs_suspiciousEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Suspicious Activity", true);
|
||||||
this.config_logs_adminEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Administrative Activity", false);
|
this.config_logs_adminEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Administrative Activity", false);
|
||||||
this.config_logs_debugEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Debug", false);
|
this.config_logs_debugEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Debug", false);
|
||||||
|
this.config_logs_mutedChatEnabled = config.getBoolean("GriefPrevention.Abridged Logs.Included Entry Types.Muted Chat Messages", false);
|
||||||
|
|
||||||
//claims mode by world
|
//claims mode by world
|
||||||
for(World world : this.config_claims_worldModes.keySet())
|
for(World world : this.config_claims_worldModes.keySet())
|
||||||
|
|
@ -846,6 +848,7 @@ public class GriefPrevention extends JavaPlugin
|
||||||
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Suspicious Activity", this.config_logs_suspiciousEnabled);
|
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Suspicious Activity", this.config_logs_suspiciousEnabled);
|
||||||
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Administrative Activity", this.config_logs_adminEnabled);
|
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Administrative Activity", this.config_logs_adminEnabled);
|
||||||
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Debug", this.config_logs_debugEnabled);
|
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Debug", this.config_logs_debugEnabled);
|
||||||
|
outConfig.set("GriefPrevention.Abridged Logs.Included Entry Types.Muted Chat Messages", this.config_logs_mutedChatEnabled);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -1032,6 +1035,7 @@ public class GriefPrevention extends JavaPlugin
|
||||||
}
|
}
|
||||||
Visualization visualization = Visualization.FromClaim(result.claim, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());
|
Visualization visualization = Visualization.FromClaim(result.claim, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());
|
||||||
Visualization.Apply(player, visualization);
|
Visualization.Apply(player, visualization);
|
||||||
|
playerData.claimResizing = null;
|
||||||
playerData.lastShovelLocation = null;
|
playerData.lastShovelLocation = null;
|
||||||
|
|
||||||
this.autoExtendClaim(result.claim);
|
this.autoExtendClaim(result.claim);
|
||||||
|
|
@ -1102,7 +1106,6 @@ public class GriefPrevention extends JavaPlugin
|
||||||
|
|
||||||
//determine new corner coordinates
|
//determine new corner coordinates
|
||||||
org.bukkit.util.Vector direction = player.getLocation().getDirection();
|
org.bukkit.util.Vector direction = player.getLocation().getDirection();
|
||||||
GriefPrevention.AddLogEntry(direction.toString());
|
|
||||||
if(direction.getY() > .75)
|
if(direction.getY() > .75)
|
||||||
{
|
{
|
||||||
GriefPrevention.sendMessage(player, TextMode.Info, Messages.ClaimsExtendToSky);
|
GriefPrevention.sendMessage(player, TextMode.Info, Messages.ClaimsExtendToSky);
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ class PlayerEventHandler implements Listener
|
||||||
recipients.clear();
|
recipients.clear();
|
||||||
recipients.addAll(recipientsToKeep);
|
recipients.addAll(recipientsToKeep);
|
||||||
|
|
||||||
GriefPrevention.AddLogEntry(notificationMessage, CustomLogEntryTypes.AdminActivity, false);
|
GriefPrevention.AddLogEntry(notificationMessage, CustomLogEntryTypes.MutedChat, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//troll and excessive profanity filter
|
//troll and excessive profanity filter
|
||||||
|
|
@ -170,7 +170,7 @@ class PlayerEventHandler implements Listener
|
||||||
//otherwise assume chat troll and mute all chat from this sender until an admin says otherwise
|
//otherwise assume chat troll and mute all chat from this sender until an admin says otherwise
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GriefPrevention.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.");
|
GriefPrevention.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.", CustomLogEntryTypes.AdminActivity);
|
||||||
GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());
|
GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -635,6 +635,7 @@ class PlayerEventHandler implements Listener
|
||||||
//otherwise build a list of all the aliases of this command across all installed plugins
|
//otherwise build a list of all the aliases of this command across all installed plugins
|
||||||
HashSet<String> aliases = new HashSet<String>();
|
HashSet<String> aliases = new HashSet<String>();
|
||||||
aliases.add(commandName);
|
aliases.add(commandName);
|
||||||
|
aliases.add("minecraft:" + commandName);
|
||||||
for(Plugin plugin : Bukkit.getServer().getPluginManager().getPlugins())
|
for(Plugin plugin : Bukkit.getServer().getPluginManager().getPlugins())
|
||||||
{
|
{
|
||||||
JavaPlugin javaPlugin = (JavaPlugin)plugin;
|
JavaPlugin javaPlugin = (JavaPlugin)plugin;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user