we are not calling this ChatInfo.
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m11s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m11s
This commit is contained in:
parent
b67eb4a127
commit
b6b3ea61a1
2 changed files with 12 additions and 11 deletions
|
@ -49,7 +49,7 @@ public class Setup {
|
|||
new ChatCrypt(),
|
||||
new ChatExtras(),
|
||||
new ChatFilter(),
|
||||
new ChatInfo(),
|
||||
new Notifier(),
|
||||
new ClickGUI(),
|
||||
new Connect(),
|
||||
new Disconnect(),
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package de.com.baseband.client.feature.modules.chat;
|
||||
package de.com.baseband.client.feature.modules.client;
|
||||
|
||||
import de.com.baseband.client.BaseBand;
|
||||
import de.com.baseband.client.event.events.PacketEvent;
|
||||
import de.com.baseband.client.event.events.TotemPopEvent;
|
||||
import de.com.baseband.client.feature.Feature;
|
||||
import de.com.baseband.client.feature.category.ClientCategory;
|
||||
import de.com.baseband.client.registry.annotation.Config;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,8 +13,8 @@ import net.minecraft.network.play.server.SPacketEntityTeleport;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@de.com.baseband.client.feature.category.Chat
|
||||
public class ChatInfo extends Feature {
|
||||
@ClientCategory
|
||||
public class Notifier extends Feature {
|
||||
|
||||
private final ArrayList<String> names = new ArrayList<>();
|
||||
private final ArrayList<String> newnames = new ArrayList<>();
|
||||
|
@ -30,7 +31,7 @@ public class ChatInfo extends Feature {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ChatInfo";
|
||||
return "Notifier";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,8 +41,8 @@ public class ChatInfo extends Feature {
|
|||
try {
|
||||
for (final Entity entity : mc.world.loadedEntityList) if (entity instanceof EntityPlayer && !entity.getName().equalsIgnoreCase(mc.player.getName())) newnames.add(entity.getName());
|
||||
if (!names.equals(newnames)) {
|
||||
for (final String name : newnames) if (!names.contains(name)) BaseBand.notify("[ChatInfo] "+name+" has entered Visual Range.");
|
||||
for (final String name : names) if (!newnames.contains(name)) BaseBand.notify("[ChatInfo] "+name+" has left Visual Range.");
|
||||
for (final String name : newnames) if (!names.contains(name)) BaseBand.notify("[" + this + "] "+name+" has entered Visual Range.");
|
||||
for (final String name : names) if (!newnames.contains(name)) BaseBand.notify("[" + this + "] "+name+" has left Visual Range.");
|
||||
names.clear();
|
||||
names.addAll(newnames);
|
||||
}
|
||||
|
@ -52,7 +53,7 @@ public class ChatInfo extends Feature {
|
|||
for (EntityPlayer player : mc.world.playerEntities) {
|
||||
if (player.getHealth() <= 0) {
|
||||
if (popList.containsKey(player.getName())) {
|
||||
BaseBand.notify("[ChatInfo] " + player.getName() + " died after popping " + popList.get(player.getName()) + " totem(s).");
|
||||
BaseBand.notify("[" + this + "] " + player.getName() + " died after popping " + popList.get(player.getName()) + " totem(s).");
|
||||
popList.remove(player.getName(), popList.get(player.getName()));
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +75,7 @@ public class ChatInfo extends Feature {
|
|||
|
||||
String warn = String.format("Entity [%s] teleported to [%.2f, %.2f, %.2f], %.2f blocks away", name, packet2.getX(), packet2.getY(), packet2.getZ(), distance);
|
||||
|
||||
BaseBand.notify("[ChatInfo] " + warn);
|
||||
BaseBand.notify("[" + this + "] " + warn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,12 +84,12 @@ public class ChatInfo extends Feature {
|
|||
public void totemPop(TotemPopEvent event) {
|
||||
if(popList.get(event.getEntity().getName()) == null) {
|
||||
popList.put(event.getEntity().getName(), 1);
|
||||
BaseBand.notify("[ChatInfo] " + event.getEntity().getName() + " popped " + 1 + " totem.");
|
||||
BaseBand.notify("[" + this + "] " + event.getEntity().getName() + " popped " + 1 + " totem.");
|
||||
} else if(popList.get(event.getEntity().getName()) != null) {
|
||||
int popCounter = popList.get(event.getEntity().getName());
|
||||
int newPopCounter = popCounter + 1;
|
||||
popList.put(event.getEntity().getName(), newPopCounter);
|
||||
BaseBand.notify("[ChatInfo] " + event.getEntity().getName() + " popped " + newPopCounter + " totems.");
|
||||
BaseBand.notify("[" + this + "] " + event.getEntity().getName() + " popped " + newPopCounter + " totems.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue