mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 06:36:44 +01:00
chat color support in flags
This commit is contained in:
parent
127f876d8e
commit
ce2de462b0
@ -21,7 +21,7 @@ public class Flag {
|
||||
* if you provide inadequate inputs
|
||||
*/
|
||||
public Flag(AbstractFlag key, String value) {
|
||||
if (!StringUtils.isAlphanumericSpace(ChatColor.stripColor(value))) {
|
||||
if (!StringUtils.isAlphanumericSpace(ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', value)))) {
|
||||
throw new IllegalArgumentException("Flag must be alphanumerical");
|
||||
}
|
||||
if (value.length() > 48) {
|
||||
|
@ -8,33 +8,14 @@
|
||||
|
||||
package com.intellectualcrafters.plot.database;
|
||||
|
||||
import static com.intellectualcrafters.plot.PlotMain.connection;
|
||||
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import sun.security.pkcs11.Secmod.DbMode;
|
||||
|
||||
import com.intellectualcrafters.plot.Flag;
|
||||
import com.intellectualcrafters.plot.FlagManager;
|
||||
import com.intellectualcrafters.plot.Logger;
|
||||
import com.intellectualcrafters.plot.Logger.LogLevel;
|
||||
import com.intellectualcrafters.plot.Plot;
|
||||
import com.intellectualcrafters.plot.PlotHomePosition;
|
||||
import com.intellectualcrafters.plot.PlotId;
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
|
||||
/**
|
||||
* @author Citymonstret
|
||||
|
@ -451,7 +451,6 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
||||
if (event.getEntity() instanceof Player) {
|
||||
return;
|
||||
}
|
||||
System.out.print(event.getEntityType().getName());
|
||||
if (!isInPlot(event.getLocation())) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user