add prefixes to duck types

This commit is contained in:
1e99 2024-12-17 17:34:08 +01:00
parent 7da03d386d
commit a1f0671be0
3 changed files with 8 additions and 8 deletions

View file

@ -6,9 +6,9 @@ import java.util.UUID;
public interface BossBars { public interface BossBars {
void add(UUID uuid, ClientBossBar bar); void pixelchat$add(UUID uuid, ClientBossBar bar);
void remove(UUID uuid); void pixelchat$remove(UUID uuid);
ClientBossBar get(UUID uuid); ClientBossBar pixelchat$get(UUID uuid);
} }

View file

@ -43,7 +43,7 @@ public class ImageUploads {
false false
); );
this.minecraft.send(() -> bossBars.add(bossBar.getUuid(), bossBar)); this.minecraft.send(() -> bossBars.pixelchat$add(bossBar.getUuid(), bossBar));
String url = null; String url = null;
Throwable error = null; Throwable error = null;
@ -95,7 +95,7 @@ public class ImageUploads {
} catch (InterruptedException ignored) { } catch (InterruptedException ignored) {
} }
this.minecraft.send(() -> bossBars.remove(bossBar.getUuid())); this.minecraft.send(() -> bossBars.pixelchat$remove(bossBar.getUuid()));
} }
private String upload(String host, Path path) throws Throwable { private String upload(String host, Path path) throws Throwable {

View file

@ -18,17 +18,17 @@ public class BossBarHudMixin implements BossBars {
Map<UUID, ClientBossBar> bossBars; Map<UUID, ClientBossBar> bossBars;
@Override @Override
public void add(UUID uuid, ClientBossBar bar) { public void pixelchat$add(UUID uuid, ClientBossBar bar) {
this.bossBars.put(uuid, bar); this.bossBars.put(uuid, bar);
} }
@Override @Override
public void remove(UUID uuid) { public void pixelchat$remove(UUID uuid) {
this.bossBars.remove(uuid); this.bossBars.remove(uuid);
} }
@Override @Override
public ClientBossBar get(UUID uuid) { public ClientBossBar pixelchat$get(UUID uuid) {
return this.bossBars.get(uuid); return this.bossBars.get(uuid);
} }
} }