Dieser Commit ist enthalten in:
Ursprung
8512a7bec5
Commit
83e5324986
@ -285,7 +285,7 @@ public class TraceManager implements Listener {
|
|||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
PlayerTraceShowData playerTraceShowData = showDataPerRegionPerPlayer
|
PlayerTraceShowData playerTraceShowData = showDataPerRegionPerPlayer
|
||||||
.computeIfAbsent(region, ignored -> new HashMap<>())
|
.computeIfAbsent(region, ignored -> new HashMap<>())
|
||||||
.computeIfAbsent(player, ignored -> new PlayerTraceShowData(BundleFilter.STRICT));
|
.computeIfAbsent(player, ignored -> new PlayerTraceShowData(BundleFilter.DEFAULT));
|
||||||
|
|
||||||
AtFlag atFlag = playerTraceShowData.getViewFlag(AtFlag.class);
|
AtFlag atFlag = playerTraceShowData.getViewFlag(AtFlag.class);
|
||||||
if (atFlag == null) {
|
if (atFlag == null) {
|
||||||
@ -315,7 +315,7 @@ public class TraceManager implements Listener {
|
|||||||
Region region = Region.getRegion(player.getLocation());
|
Region region = Region.getRegion(player.getLocation());
|
||||||
PlayerTraceShowData playerTraceShowData = showDataPerRegionPerPlayer
|
PlayerTraceShowData playerTraceShowData = showDataPerRegionPerPlayer
|
||||||
.computeIfAbsent(region, ignored -> new HashMap<>())
|
.computeIfAbsent(region, ignored -> new HashMap<>())
|
||||||
.computeIfAbsent(player, ignored -> new PlayerTraceShowData(BundleFilter.STRICT));
|
.computeIfAbsent(player, ignored -> new PlayerTraceShowData(BundleFilter.DEFAULT));
|
||||||
|
|
||||||
IsolateFlag isolateFlag;
|
IsolateFlag isolateFlag;
|
||||||
if (playerTraceShowData.hasViewFlagOnly(IsolateFlag.class)) {
|
if (playerTraceShowData.hasViewFlagOnly(IsolateFlag.class)) {
|
||||||
@ -324,7 +324,7 @@ public class TraceManager implements Listener {
|
|||||||
isolateFlag = new IsolateFlag();
|
isolateFlag = new IsolateFlag();
|
||||||
playerTraceShowData.addViewFlag(isolateFlag);
|
playerTraceShowData.addViewFlag(isolateFlag);
|
||||||
} else {
|
} else {
|
||||||
playerTraceShowData = new PlayerTraceShowData(BundleFilter.STRICT);
|
playerTraceShowData = new PlayerTraceShowData(BundleFilter.DEFAULT);
|
||||||
isolateFlag = new IsolateFlag();
|
isolateFlag = new IsolateFlag();
|
||||||
playerTraceShowData.addViewFlag(isolateFlag);
|
playerTraceShowData.addViewFlag(isolateFlag);
|
||||||
showDataPerRegionPerPlayer.get(region).put(player, playerTraceShowData);
|
showDataPerRegionPerPlayer.get(region).put(player, playerTraceShowData);
|
||||||
|
@ -163,7 +163,18 @@ public abstract class ViewFlag {
|
|||||||
@Override
|
@Override
|
||||||
public void modify(REntityServer server, List<TraceEntity> entities) {
|
public void modify(REntityServer server, List<TraceEntity> entities) {
|
||||||
for (TraceEntity entity : entities) {
|
for (TraceEntity entity : entities) {
|
||||||
entity.setDisplayName(String.valueOf(entity.getRecords().get(0).getFuse()));
|
List<String> fuses = entity.getRecords()
|
||||||
|
.stream()
|
||||||
|
.map(TNTPoint::getFuse)
|
||||||
|
.distinct()
|
||||||
|
.sorted()
|
||||||
|
.map(i -> i + "")
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (fuses.size() <= 5) {
|
||||||
|
entity.setDisplayName(String.join(",", fuses));
|
||||||
|
} else {
|
||||||
|
entity.setDisplayName(fuses.stream().limit(5).collect(Collectors.joining(",")) + ", +" + (fuses.size() - 5));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren