Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #830 from UnicacityAddon/feature/UCA-829-remove-br…
Browse files Browse the repository at this point in the history
…oadcast-system

feature/UCA-829-remove-broadcast-system
  • Loading branch information
rettichlp authored Sep 2, 2023
2 parents b17fa0f + 21ec9ca commit a52de24
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 254 deletions.
19 changes: 0 additions & 19 deletions api/src/main/java/com/rettichlp/unicacityaddon/api/Broadcast.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
* user-friendliness, an update should not always have to be created for changes to content-related data. I utilize an
* API to provide data, leveraging a private server. Data is available for the following purposes:
* <ul>
* <li>activity check <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/activitycheck/LEMILIEU/add">API</a> (unauthorized)</li>
* <li>auto nc <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/autonc">API</a> (unauthorized)</li>
* <li>addon groups <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/player">API</a></li>
* <li>banners <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/banner">API</a></li>
* <li>blacklist reasons <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/blacklistreason/LEMILIEU">API</a> (unauthorized)</li>
* <li>blackmarket locations <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/blackmarket">API</a></li>
* <li>broadcasts <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/broadcast/queue">API</a></li>
* <li>events <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/event">API</a></li>
* <li>house bans <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/houseban?advanced=false">API</a> (unauthorized for <code>advanced=true</code>)</li>
* <li>house ban reasons <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/housebanreason">API</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public enum ApplicationPath {
BANNER("/banner"),
BLACKLISTREASON("/blacklistreason"),
BLACKMARKETLOCATION("/blackmarket"),
BROADCAST("/broadcast"),
EVENT("/event"),
HOUSEBAN("/houseban"),
HOUSEBANREASON("/housebanreason"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.rettichlp.unicacityaddon.api.AutoNC;
import com.rettichlp.unicacityaddon.api.BlackMarketLocation;
import com.rettichlp.unicacityaddon.api.BlacklistReason;
import com.rettichlp.unicacityaddon.api.Broadcast;
import com.rettichlp.unicacityaddon.api.NaviPoint;
import com.rettichlp.unicacityaddon.api.Revive;
import com.rettichlp.unicacityaddon.api.RoleplayName;
Expand All @@ -29,6 +28,7 @@
import com.rettichlp.unicacityaddon.base.enums.faction.DrugPurity;
import com.rettichlp.unicacityaddon.base.enums.faction.DrugType;
import com.rettichlp.unicacityaddon.base.enums.faction.Faction;
import com.rettichlp.unicacityaddon.base.services.FileService;
import com.rettichlp.unicacityaddon.base.text.ColorCode;
import com.rettichlp.unicacityaddon.base.text.Message;
import com.rettichlp.unicacityaddon.base.text.PatternHandler;
Expand Down Expand Up @@ -71,7 +71,6 @@
* <li>banners <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/banner">API</a></li>
* <li>blacklist reasons <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/blacklistreason/LEMILIEU">API</a> (unauthorized)</li>
* <li>blackmarket locations <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/blackmarket">API</a></li>
* <li>broadcasts <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/broadcast/queue">API</a></li>
* <li>events <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/event">API</a></li>
* <li>house bans <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/houseban?advanced=false">API</a> (unauthorized for <code>advanced=true</code>)</li>
* <li>house ban reasons <a href="http://rettichlp.de:8888/unicacityaddon/v1/dhgpsklnag2354668ec1d905xcv34d9bdee4b877/housebanreason">API</a></li>
Expand Down Expand Up @@ -351,26 +350,6 @@ public Success sendBlacklistReasonRemoveRequest(String reason) {
.getAsJsonObjectAndParse(Success.class);
}

public List<Broadcast> sendBroadcastQueueRequest() {
return RequestBuilder.getBuilder(this.unicacityAddon)
.preCondition(this.token != null)
.nonProd(this.unicacityAddon.configuration().local().get())
.applicationPath(ApplicationPath.BROADCAST)
.subPath(QUEUE_SUB_PATH)
.getAsJsonArrayAndParse(Broadcast.class);
}

public Success sendBroadcastSendRequest(String message, String sendTime) {
return RequestBuilder.getBuilder(this.unicacityAddon)
.nonProd(this.unicacityAddon.configuration().local().get())
.applicationPath(ApplicationPath.BROADCAST)
.subPath(SEND_SUB_PATH)
.parameter(Map.of(
"message", message,
"sendTime", sendTime))
.getAsJsonObjectAndParse(Success.class);
}

public Event sendEventRequest() {
return RequestBuilder.getBuilder(this.unicacityAddon)
.nonProd(this.unicacityAddon.configuration().local().get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.rettichlp.unicacityaddon.commands.TodoListCommand;
import com.rettichlp.unicacityaddon.commands.api.AutoNCCommand;
import com.rettichlp.unicacityaddon.commands.api.BlacklistReasonCommand;
import com.rettichlp.unicacityaddon.commands.api.BroadcastCommand;
import com.rettichlp.unicacityaddon.commands.api.HousebanCommand;
import com.rettichlp.unicacityaddon.commands.api.HousebanReasonCommand;
import com.rettichlp.unicacityaddon.commands.api.NaviPointCommand;
Expand Down Expand Up @@ -113,7 +112,6 @@
import com.rettichlp.unicacityaddon.hudwidgets.PlantHudWidget;
import com.rettichlp.unicacityaddon.hudwidgets.TimerHudWidget;
import com.rettichlp.unicacityaddon.listener.AccountListener;
import com.rettichlp.unicacityaddon.listener.BroadcastListener;
import com.rettichlp.unicacityaddon.listener.CarListener;
import com.rettichlp.unicacityaddon.listener.DrugListener;
import com.rettichlp.unicacityaddon.listener.EquipShopListener;
Expand Down Expand Up @@ -234,7 +232,6 @@ public class Registry {
BannerListener.class,
BlacklistListener.class,
BlacklistModifyListener.class,
BroadcastListener.class,
CarListener.class,
ChatLogReceiveChatListener.class,
ChatLogSendChatListener.class,
Expand Down Expand Up @@ -297,7 +294,6 @@ public class Registry {
BlacklistInfoCommand.class,
BlacklistReasonCommand.class,
BlockCommand.class,
BroadcastCommand.class,
BusCommand.class,
CalculateCommand.class,
CancelCountdownCommand.class,
Expand Down

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions docs/api/endpoints/broadcast.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/api/endpoints/event.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Broadcast
# Event

OpenAPI: (noch nicht verfügbar)

Expand Down
16 changes: 0 additions & 16 deletions docs/api/function/daten-und-speicherung.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,6 @@ Speichert die Blacklist-Gründe.
- `issuerMinecraftUuid` Minecraft UUID des Spielers, der den Blacklist-Grund hinzugefügt hat
- `faction` Fraktion, der der Blacklist-Grund gehört

## Broadcast

Speichert Broadcasts bis die `sendTime` vorbei ist.

- `senderMinecraftUuid` Minecraft UUID des Spielers, der den Broadcast gesendet hat
- `senderMinecraftName` Minecraft Name des Spielers, der den Broadcast gesendet hat
- `createTime` Zeitpunkt der Erstellung
- `sendTime` Zeitpunkt an dem der Broadcast gesendet werden soll

!!! note

Der Name wird gespeichert, da die eigentliche Broadcast Nachricht den Namen des Senders enthält. Es soll jedoch
nicht jeder Client die Mojang API aufrufen, um den Namen anhand der Minecraft UUID abzurufen. Darum wird der Name
gespeichert und über den API Endpunkt, zum abrufen von aktiven Broadcasts, mitgesendet. Der Name wird serverseitig
gecached, da er noch für andere Funktionen benötigt wird.

## HouseBan

Speichert Spieler mit einem Hausverbot im Krankenhaus/in der Feuerwache.
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ nav:
- Banner: api/endpoints/banner.md
- Blacklist: api/endpoints/blacklist.md
- Blackmarket: api/endpoints/blackmarket.md
- Broadcast: api/endpoints/broadcast.md
- Event: api/endpoints/event.md
- Faction Member: api/endpoints/faction-member.md
- House Ban: api/endpoints/house-ban.md
Expand Down

0 comments on commit a52de24

Please sign in to comment.