F map autoupdate during flying fixed.
This commit is contained in:
@@ -3,19 +3,12 @@ package com.massivecraft.factions.cmd;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.World;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
public class CmdShowClaims extends FCommand {
|
||||
|
||||
public class CmdShowClaims extends FCommand{
|
||||
|
||||
public CmdShowClaims(){
|
||||
public CmdShowClaims() {
|
||||
|
||||
this.aliases.add("showclaims");
|
||||
this.aliases.add("showclaim");
|
||||
@@ -31,20 +24,20 @@ public class CmdShowClaims extends FCommand{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(){
|
||||
sendMessage(TL.COMMAND_SHOWCLAIMS_HEADER.toString().replace("{faction}",fme.getFaction().describeTo(fme)));
|
||||
ListMultimap<String,String> chunkMap = ArrayListMultimap.create();
|
||||
public void perform() {
|
||||
sendMessage(TL.COMMAND_SHOWCLAIMS_HEADER.toString().replace("{faction}", fme.getFaction().describeTo(fme)));
|
||||
ListMultimap<String, String> chunkMap = ArrayListMultimap.create();
|
||||
String format = TL.COMMAND_SHOWCLAIMS_CHUNKSFORMAT.toString();
|
||||
for (FLocation fLocation : fme.getFaction().getAllClaims()){
|
||||
chunkMap.put(fLocation.getWorldName(),format.replace("{x}",fLocation.getX() + "").replace("{z}",fLocation.getZ() + ""));
|
||||
for (FLocation fLocation : fme.getFaction().getAllClaims()) {
|
||||
chunkMap.put(fLocation.getWorldName(), format.replace("{x}", fLocation.getX() + "").replace("{z}", fLocation.getZ() + ""));
|
||||
}
|
||||
for (String world : chunkMap.keySet()){
|
||||
String message = TL.COMMAND_SHOWCLAIMS_FORMAT.toString().replace("{world}",world);
|
||||
sendMessage(message.replace("{chunks}","")); // made {chunks} blank as I removed the placeholder and people wont update their config :shrug:
|
||||
for (String world : chunkMap.keySet()) {
|
||||
String message = TL.COMMAND_SHOWCLAIMS_FORMAT.toString().replace("{world}", world);
|
||||
sendMessage(message.replace("{chunks}", "")); // made {chunks} blank as I removed the placeholder and people wont update their config :shrug:
|
||||
StringBuilder chunks = new StringBuilder("");
|
||||
for (String chunkString : chunkMap.get(world)){
|
||||
for (String chunkString : chunkMap.get(world)) {
|
||||
chunks.append(chunkString + ", ");
|
||||
if (chunks.toString().length() >= 2000 ) {
|
||||
if (chunks.toString().length() >= 2000) {
|
||||
sendMessage(chunks.toString());
|
||||
chunks.setLength(0);
|
||||
}
|
||||
@@ -54,10 +47,6 @@ public class CmdShowClaims extends FCommand{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user