forked from ChomeNS/chomens-bot-java
gamemode adventure
This commit is contained in:
parent
798d6fd197
commit
1ab7aa86ed
1 changed files with 9 additions and 9 deletions
|
@ -102,6 +102,7 @@ public class FilterPlugin extends PlayersPlugin.Listener {
|
||||||
|
|
||||||
deOp(target);
|
deOp(target);
|
||||||
mute(target);
|
mute(target);
|
||||||
|
gamemode(target);
|
||||||
|
|
||||||
bot.exploits.kick(target.profile.getId());
|
bot.exploits.kick(target.profile.getId());
|
||||||
}
|
}
|
||||||
|
@ -112,15 +113,8 @@ public class FilterPlugin extends PlayersPlugin.Listener {
|
||||||
if (player == null) return;
|
if (player == null) return;
|
||||||
|
|
||||||
deOp(sender);
|
deOp(sender);
|
||||||
|
gamemode(sender);
|
||||||
if (
|
mute(sender);
|
||||||
command.startsWith("/op") ||
|
|
||||||
command.startsWith("/minecraft:op") ||
|
|
||||||
command.startsWith("/deop") ||
|
|
||||||
command.startsWith("/minecraft:deop")
|
|
||||||
) {
|
|
||||||
mute(sender);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playerMessageReceived (PlayerMessage message) {
|
public void playerMessageReceived (PlayerMessage message) {
|
||||||
|
@ -132,6 +126,7 @@ public class FilterPlugin extends PlayersPlugin.Listener {
|
||||||
|
|
||||||
deOp(message.sender);
|
deOp(message.sender);
|
||||||
mute(message.sender);
|
mute(message.sender);
|
||||||
|
gamemode(message.sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mute (PlayerEntry target) { mute(target, ""); }
|
public void mute (PlayerEntry target) { mute(target, ""); }
|
||||||
|
@ -143,6 +138,10 @@ public class FilterPlugin extends PlayersPlugin.Listener {
|
||||||
bot.core.run("minecraft:execute run deop " + UUIDUtilities.selector(target.profile.getId()));
|
bot.core.run("minecraft:execute run deop " + UUIDUtilities.selector(target.profile.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void gamemode (PlayerEntry target) {
|
||||||
|
bot.core.run("minecraft:gamemode adventure " + UUIDUtilities.selector(target.profile.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
public void kick () {
|
public void kick () {
|
||||||
for (PlayerEntry target : bot.players.list) {
|
for (PlayerEntry target : bot.players.list) {
|
||||||
final FilteredPlayer player = getPlayer(target.profile.getName());
|
final FilteredPlayer player = getPlayer(target.profile.getName());
|
||||||
|
@ -164,6 +163,7 @@ public class FilterPlugin extends PlayersPlugin.Listener {
|
||||||
|
|
||||||
deOp(target);
|
deOp(target);
|
||||||
mute(target);
|
mute(target);
|
||||||
|
gamemode(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FilteredPlayer remove (int index) {
|
public FilteredPlayer remove (int index) {
|
||||||
|
|
Loading…
Reference in a new issue