mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 04:21:31 +02:00
Merge branch 'master' of https://github.com/essentials/Essentials
This commit is contained in:
@@ -243,7 +243,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||
pm.registerEvents(tntListener, this);
|
||||
|
||||
|
||||
final EssentialsTimer timer = new EssentialsTimer(this);
|
||||
timer = new EssentialsTimer(this);
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, timer, 1, 100);
|
||||
execTimer.mark("RegListeners");
|
||||
|
||||
|
@@ -180,7 +180,7 @@ public class SpawnsHolder extends AsyncStorageObjectHolder<Spawns> implements IE
|
||||
acquireReadLock();
|
||||
try
|
||||
{
|
||||
return getData().getNewPlayerAnnouncement().replace('&', '<EFBFBD>').replace("<EFBFBD><EFBFBD>", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", ess.getRanks().getMainGroup(user)).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString());
|
||||
return getData().getNewPlayerAnnouncement().replace('&', '§').replace("§§", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", ess.getRanks().getMainGroup(user)).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@@ -8,7 +8,7 @@ import java.util.Set;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
|
||||
@Data
|
||||
@@ -39,7 +39,7 @@ public class Prevent implements StorageObject
|
||||
"permission essentials.protect.entitytarget.bypass disables this"
|
||||
})
|
||||
private boolean entitytarget = false;
|
||||
@MapKeyType(CreatureType.class)
|
||||
@MapKeyType(EntityType.class)
|
||||
@MapValueType(Boolean.class)
|
||||
private Map<CreatureType, Boolean> spawn = new HashMap<CreatureType, Boolean>();
|
||||
private Map<EntityType, Boolean> spawn = new HashMap<EntityType, Boolean>();
|
||||
}
|
@@ -212,14 +212,6 @@ public class User extends UserBase implements IUser
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void requestTeleport(final User player, final boolean here)
|
||||
{
|
||||
teleportRequestTime = System.currentTimeMillis();
|
||||
teleportRequester = player;
|
||||
tpRequestHere = here;
|
||||
}
|
||||
|
||||
public String getNick(boolean addprefixsuffix)
|
||||
{
|
||||
acquireReadLock();
|
||||
@@ -583,9 +575,11 @@ public class User extends UserBase implements IUser
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestTeleport(IUser user, boolean b)
|
||||
public void requestTeleport(IUser player, boolean here)
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
teleportRequestTime = System.currentTimeMillis();
|
||||
teleportRequester = player;
|
||||
tpRequestHere = here;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -85,9 +85,9 @@ public class TextInput implements IText
|
||||
if (line.length() > 0 && line.charAt(0) == '#')
|
||||
{
|
||||
bookmarks.put(line.substring(1).toLowerCase(Locale.ENGLISH).replaceAll("&[0-9a-fk]", ""), lineNumber);
|
||||
chapters.add(line.substring(1).replace('&', '<EFBFBD>').replace("<EFBFBD>", "&"));
|
||||
chapters.add(line.substring(1).replace('&', '§').replace("§", "&"));
|
||||
}
|
||||
lines.add(line.replace('&', '<EFBFBD>').replace("<EFBFBD>", "&"));
|
||||
lines.add(line.replace('&', '§').replace("§", "&"));
|
||||
lineNumber++;
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,9 @@ public class TextInput implements IText
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(output != null)
|
||||
output.close();
|
||||
if(input != null)
|
||||
input.close();
|
||||
}
|
||||
throw new FileNotFoundException("File " + filename + ".txt does not exist. Creating one for you.");
|
||||
|
@@ -187,10 +187,10 @@ public class UpdateCheck
|
||||
|
||||
private int getBukkitVersion()
|
||||
{
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-([0-9]+).([0-9]+).([0-9]+)-[0-9]+-[0-9a-z]+-b([0-9]+)jnks.*").matcher(plugin.getServer().getVersion());
|
||||
if (versionMatch.matches())
|
||||
final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[\\.0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(plugin.getServer().getVersion());
|
||||
if (versionMatch.matches())
|
||||
{
|
||||
return Integer.parseInt(versionMatch.group(4));
|
||||
return Integer.parseInt(versionMatch.group(1));
|
||||
}
|
||||
throw new NumberFormatException("Bukkit Version changed!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user