|
33 | 33 | import com.lunarclient.apollo.mods.impl.ModMinimap; |
34 | 34 | import com.lunarclient.apollo.mods.impl.ModWaypoints; |
35 | 35 | import com.lunarclient.apollo.module.modsetting.ModSettingModule; |
36 | | -import com.lunarclient.apollo.option.Options; |
37 | 36 | import com.lunarclient.apollo.player.ApolloPlayer; |
38 | 37 | import java.util.Objects; |
39 | 38 | import java.util.Optional; |
|
44 | 43 | import org.bukkit.event.EventHandler; |
45 | 44 | import org.bukkit.event.Listener; |
46 | 45 | import org.bukkit.event.block.BlockPlaceEvent; |
47 | | -import org.bukkit.event.player.AsyncPlayerChatEvent; |
48 | 46 |
|
49 | 47 | public class ApolloModStatusExample implements ApolloListener, Listener { |
50 | 48 |
|
@@ -96,44 +94,4 @@ private void printOptionStatusExample(Player player) { |
96 | 94 | }); |
97 | 95 | } |
98 | 96 |
|
99 | | - @EventHandler |
100 | | - private void onPlayerChat(AsyncPlayerChatEvent event) { |
101 | | - Player player = event.getPlayer(); |
102 | | - String message = event.getMessage(); |
103 | | - |
104 | | - Apollo.getPlayerManager().getPlayer(player.getUniqueId()).ifPresent(apolloPlayer -> { |
105 | | - Options options = this.modSettingModule.getOptions(); |
106 | | - |
107 | | - switch (message.toLowerCase()) { |
108 | | - case "1": { |
109 | | - options.set(ModWaypoints.ENABLED, false); |
110 | | - options.set(ModWaypoints.DEATH_WAYPOINT, false); |
111 | | - player.sendMessage("=1"); |
112 | | - break; |
113 | | - } |
114 | | - |
115 | | - case "2": { |
116 | | - options.set(ModWaypoints.ENABLED, null); |
117 | | - options.set(ModWaypoints.DEATH_WAYPOINT, null); |
118 | | - player.sendMessage("=2"); |
119 | | - break; |
120 | | - } |
121 | | - |
122 | | - case "3": { |
123 | | - options.set(apolloPlayer, ModWaypoints.ENABLED, false); |
124 | | - options.set(apolloPlayer, ModWaypoints.DEATH_WAYPOINT, false); |
125 | | - player.sendMessage("=3"); |
126 | | - break; |
127 | | - } |
128 | | - |
129 | | - case "4": { |
130 | | - options.set(apolloPlayer, ModWaypoints.ENABLED, null); |
131 | | - options.set(apolloPlayer, ModWaypoints.DEATH_WAYPOINT, null); |
132 | | - player.sendMessage("=4"); |
133 | | - break; |
134 | | - } |
135 | | - } |
136 | | - }); |
137 | | - } |
138 | | - |
139 | 97 | } |
0 commit comments