gave twitch same perms as youtubers
This commit is contained in:
parent
eff71c3e17
commit
71148ef387
@ -345,7 +345,7 @@ public class AntiHack extends MiniPlugin
|
||||
}
|
||||
|
||||
//Auto-Kick
|
||||
if (!handled && _clientManager.Get(player).GetRank() == Rank.YOUTUBE)
|
||||
if (!handled && _clientManager.Get(player).GetRank() != Rank.YOUTUBE && _clientManager.Get(player).GetRank() != Rank.TWITCH)
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 2f, 0.5f);
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class PersonalServerManager extends MiniPlugin
|
||||
|
||||
Rank rank = _clientManager.Get(player).GetRank();
|
||||
|
||||
if (eventServer || rank.Has(Rank.SNR_MODERATOR) || rank == Rank.YOUTUBE)
|
||||
if (eventServer || rank.Has(Rank.SNR_MODERATOR) || rank == Rank.YOUTUBE || rank == Rank.TWITCH)
|
||||
{
|
||||
ram = 2048;
|
||||
cpu = 4;
|
||||
|
@ -255,7 +255,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
||||
|
||||
buildPreference(40, Material.RED_ROSE, "Show Pending Friend Requests", userPreferences.PendingFriendRequests, _togglePendingFriendRequests);
|
||||
|
||||
if (getClientManager().Get(getPlayer()).GetRank() == Rank.YOUTUBE)
|
||||
if (getClientManager().Get(getPlayer()).GetRank() == Rank.YOUTUBE || getClientManager().Get(getPlayer()).GetRank() == Rank.TWITCH)
|
||||
{
|
||||
buildPreference(38, Material.NETHER_STAR, "Hub Invisibility", userPreferences.Invisibility, _toggleHubInvisibility);
|
||||
buildPreference(42, Material.SLIME_BALL, "Hub Forcefield", userPreferences.HubForcefield, _toggleHubForcefield);
|
||||
|
@ -103,7 +103,7 @@ import nautilus.game.arcade.addons.TeamArmorAddon;
|
||||
import nautilus.game.arcade.command.DisguiseCommand;
|
||||
import nautilus.game.arcade.command.GameCommand;
|
||||
import nautilus.game.arcade.command.WriteCommand;
|
||||
import nautilus.game.arcade.command.YoutubeCommand;
|
||||
import nautilus.game.arcade.command.KitUnlockCommand;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
@ -407,7 +407,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
addCommand(new GameCommand(this));
|
||||
addCommand(new WriteCommand(this));
|
||||
addCommand(new YoutubeCommand(this));
|
||||
addCommand(new KitUnlockCommand(this));
|
||||
addCommand(new DisguiseCommand(this));
|
||||
}
|
||||
|
||||
@ -1207,21 +1207,21 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
return _game != null && _game.InProgress();
|
||||
}
|
||||
|
||||
public boolean isYoutuber(Player player)
|
||||
public boolean hasKitsUnlocked(Player player)
|
||||
{
|
||||
return _youtube.contains(player);
|
||||
}
|
||||
|
||||
public void setYoutuber(Player caller)
|
||||
public void toggleUnlockKits(Player caller)
|
||||
{
|
||||
if (_youtube.remove(caller))
|
||||
{
|
||||
UtilPlayer.message(caller, C.cRed + C.Bold + "YouTube Mode Disabled: " + ChatColor.RESET + "Kits Locked");
|
||||
UtilPlayer.message(caller, C.cRed + C.Bold + "Celebrity Mode Disabled: " + ChatColor.RESET + "Kits Locked");
|
||||
}
|
||||
else
|
||||
{
|
||||
_youtube.add(caller);
|
||||
UtilPlayer.message(caller, C.cGreen + C.Bold + "YouTube Mode Enabled: " + ChatColor.RESET + "All Kits Unlocked");
|
||||
UtilPlayer.message(caller, C.cGreen + C.Bold + "Celebrity Mode Enabled: " + ChatColor.RESET + "All Kits Unlocked");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ public class GameCommand extends MultiCommandBase<ArcadeManager>
|
||||
{
|
||||
public GameCommand(ArcadeManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "game");
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.MAPLEAD, Rank.JNR_DEV}, "game");
|
||||
|
||||
AddCommand(new StartCommand(Plugin));
|
||||
AddCommand(new StopCommand(Plugin));
|
||||
|
@ -6,16 +6,16 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
|
||||
public class YoutubeCommand extends CommandBase<ArcadeManager>
|
||||
public class KitUnlockCommand extends CommandBase<ArcadeManager>
|
||||
{
|
||||
public YoutubeCommand(ArcadeManager plugin)
|
||||
public KitUnlockCommand(ArcadeManager plugin)
|
||||
{
|
||||
super(plugin, Rank.OWNER, new Rank[] {Rank.YOUTUBE, Rank.TWITCH}, new String[] {"youtube", "twitch"});
|
||||
super(plugin, Rank.OWNER, new Rank[] {Rank.YOUTUBE, Rank.TWITCH}, new String[] {"youtube", "twitch", "kits"});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Execute(Player caller, String[] args)
|
||||
{
|
||||
Plugin.setYoutuber(caller);
|
||||
Plugin.toggleUnlockKits(caller);
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ public class SetCommand extends CommandBase<ArcadeManager>
|
||||
{
|
||||
public SetCommand(ArcadeManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "set");
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.MAPLEAD, Rank.JNR_DEV}, "set");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -12,7 +12,7 @@ public class StartCommand extends CommandBase<ArcadeManager>
|
||||
{
|
||||
public StartCommand(ArcadeManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "start");
|
||||
super(plugin, Rank.ADMIN, new Rank[] {Rank.MAPLEAD, Rank.JNR_DEV}, "start");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -220,8 +220,8 @@ public abstract class Kit implements Listener
|
||||
return _achivementCategory;
|
||||
}
|
||||
|
||||
public boolean isYoutuber(Player player)
|
||||
public boolean hasKitsUnlocked(Player player)
|
||||
{
|
||||
return Manager.isYoutuber(player);
|
||||
return Manager.hasKitsUnlocked(player);
|
||||
}
|
||||
}
|
||||
|
@ -1099,7 +1099,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
|
||||
}
|
||||
|
||||
if (ent.GetKit().GetAvailability() == KitAvailability.Free || //Free
|
||||
Manager.isYoutuber(player) || //YouTube
|
||||
Manager.hasKitsUnlocked(player) || //YouTube
|
||||
(ent.GetKit().GetAvailability() == KitAvailability.Achievement &&
|
||||
Manager.GetAchievement().hasCategory(player, ent.GetKit().getAchievementRequirement())) || //Achievement
|
||||
donor.OwnsUnknownPackage(Manager.GetGame().GetName() + " " + ent.GetKit().GetName()) || //Green
|
||||
|
@ -325,7 +325,7 @@ public class GamePlayerManager implements Listener
|
||||
|
||||
if (kit.GetAvailability() == KitAvailability.Free || //Free
|
||||
|
||||
Manager.isYoutuber(player) || //YouTube
|
||||
Manager.hasKitsUnlocked(player) || //YouTube
|
||||
|
||||
(kit.GetAvailability() == KitAvailability.Achievement && //Achievement
|
||||
Manager.GetAchievement().hasCategory(player, kit.getAchievementRequirement())) ||
|
||||
|
Loading…
Reference in New Issue
Block a user