Repurpose MAC reports pref for GWEN reports

This commit is contained in:
cnr 2016-08-11 03:51:16 -04:00
parent 7b1ac5ded2
commit 4562b00dcb
3 changed files with 15 additions and 19 deletions

View File

@ -8,6 +8,7 @@ import com.mineplex.anticheat.api.GameStartEvent;
import com.mineplex.anticheat.api.MineplexLink;
import com.mineplex.anticheat.api.PlayerViolationEvent;
import mineplex.core.PlayerSelector;
import mineplex.core.Managers;
import mineplex.core.MiniPlugin;
import mineplex.core.ReflectivelyCreateMiniPlugin;
import mineplex.core.account.CoreClient;
@ -257,7 +258,7 @@ public class AntiHack extends MiniPlugin
for (Player player : Bukkit.getOnlinePlayers())
{
if (_clientManager.Get(player).GetRank().has(Rank.HELPER))
if (Managers.get(PreferencesManager.class).Get(player).ShowMacReports && _clientManager.Get(player).GetRank().has(Rank.HELPER))
{
((CraftPlayer) player).getHandle().sendMessage(component);
}
@ -845,14 +846,6 @@ public class AntiHack extends MiniPlugin
total += _offense.get(player).get(curType).size();
}
//Inform
for (Player admin : UtilServer.getPlayers())
if (_clientManager.Get(admin).GetRank().has(Rank.SNR_MODERATOR) && _preferences.Get(admin).ShowMacReports)
{
UtilPlayer.message(admin, "#" + total + ": " + C.cRed + C.Bold + player.getName() + " suspected for " + type + ".");
}
// Print (Debug)
System.out.println("[Offense] #" + total + ": " + player.getName() + " received suspicion for " + type + ".");
}
@ -929,10 +922,6 @@ public class AntiHack extends MiniPlugin
UtilPlayer.message(player, C.cAqua + C.Scramble + "A" + ChatColor.RESET + C.cRed + C.Bold + " GWEN > " + ChatColor.RESET + C.cGold + event.getPlayer().getName() + C.cYellow + " failed " + event.getHackType() + " VL" + event.getViolations() + ": " + event.getMessage() + ". Please investigate");
}
}
else if (client.GetRank().has(Rank.SNR_MODERATOR) && _preferences.Get(player).ShowMacReports)
{
UtilPlayer.message(player, "#" + event.getViolations() + ": " + C.cRed + C.Bold + event.getPlayer().getName() + " suspected for " + event.getHackType() + ".");
}
}
if (event.shouldTellStaff())

View File

@ -126,7 +126,7 @@ public class ExclusivePreferencesPage extends ShopPageBase<PreferencesManager, E
buildPreference(indices[0], Material.NETHER_STAR, "Hub Invisibility", userPreferences.Invisibility, _toggleHubInvisibility);
buildPreference(indices[1], Material.SLIME_BALL, "Hub Forcefield", userPreferences.HubForcefield, _toggleHubForcefield);
buildPreference(indices[2], Material.PAPER, "Mac Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(indices[2], Material.PAPER, "GWEN Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(indices[3], Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
buildPreference(indices[4], Material.BOOK, "User Reports", userPreferences.ShowUserReports, _toggleUserReports);
}
@ -134,16 +134,23 @@ public class ExclusivePreferencesPage extends ShopPageBase<PreferencesManager, E
{
int[] indices = UtilUI.getIndicesFor(3, 0, 2);
buildPreference(indices[0], Material.PAPER, "Mac Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(indices[0], Material.PAPER, "GWEN Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(indices[1], Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
buildPreference(indices[2], Material.BOOK, "User Reports", userPreferences.ShowUserReports, _toggleUserReports);
}
else if (rank.has(Rank.MODERATOR))
{
int[] indices = UtilUI.getIndicesFor(2, 0, 2);
int[] indices = UtilUI.getIndicesFor(3, 0, 2);
buildPreference(indices[0], Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
buildPreference(indices[1], Material.BOOK, "User Reports", userPreferences.ShowUserReports, _toggleUserReports);
buildPreference(indices[0], Material.PAPER, "GWEN Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(indices[1], Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
buildPreference(indices[2], Material.BOOK, "User Reports", userPreferences.ShowUserReports, _toggleUserReports);
}
else if (rank.has(Rank.HELPER))
{
int[] indices = UtilUI.getIndicesFor(1, 0, 2);
buildPreference(indices[0], Material.PAPER, "GWEN Reports", userPreferences.ShowMacReports, _toggleMacReports);
}
else if (rank == Rank.YOUTUBE || rank == Rank.TWITCH)
{

View File

@ -231,7 +231,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
if (rank.has(Rank.ULTRA))
buildPreference(indices[8], Material.BARRIER, "Disable Ads", userPreferences.DisableAds, _toggleDisableAds);
if (rank.has(Rank.MODERATOR) || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.YOUTUBE_SMALL)
if (rank.has(Rank.HELPER) || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.YOUTUBE_SMALL)
{
addButton(53, new ShopItem(Material.DIAMOND, (byte) 0, C.cAqua + "Exclusive Preferences", new String[]{C.cGold + "This will open a page of preferences", C.cGold + "that are only available to you."}, 1, false, false), new IButton()
{