Reset these files to their previous state (IDE added tabs).
This commit is contained in:
parent
c923745f5f
commit
70260754ff
@ -39,7 +39,7 @@ public abstract class CommandBase<PluginType extends MiniPlugin> implements ICom
|
|||||||
|
|
||||||
_aliases = Arrays.asList(aliases);
|
_aliases = Arrays.asList(aliases);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<String> Aliases()
|
public Collection<String> Aliases()
|
||||||
{
|
{
|
||||||
return _aliases;
|
return _aliases;
|
||||||
|
@ -27,7 +27,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
private IButton _toggleClanTips;
|
private IButton _toggleClanTips;
|
||||||
private IButton _toggleHubMusic;
|
private IButton _toggleHubMusic;
|
||||||
private IButton _toggleDisableAds;
|
private IButton _toggleDisableAds;
|
||||||
|
|
||||||
private boolean _hubGamesToggled;
|
private boolean _hubGamesToggled;
|
||||||
private boolean _hubPlayersToggled;
|
private boolean _hubPlayersToggled;
|
||||||
private boolean _hubChatToggled;
|
private boolean _hubChatToggled;
|
||||||
@ -37,19 +37,19 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
private boolean _clanTipsToggled;
|
private boolean _clanTipsToggled;
|
||||||
private boolean _hubMusicToggled;
|
private boolean _hubMusicToggled;
|
||||||
private boolean _disableAdsToggled;
|
private boolean _disableAdsToggled;
|
||||||
|
|
||||||
private ExclusivePreferencesShop _exclusiveShop;
|
private ExclusivePreferencesShop _exclusiveShop;
|
||||||
|
|
||||||
public PreferencesPage(PreferencesManager plugin, PreferencesShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, ExclusivePreferencesShop exclusiveShop)
|
public PreferencesPage(PreferencesManager plugin, PreferencesShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, ExclusivePreferencesShop exclusiveShop)
|
||||||
{
|
{
|
||||||
super(plugin, shop, clientManager, donationManager, name, player, 54);
|
super(plugin, shop, clientManager, donationManager, name, player, 54);
|
||||||
|
|
||||||
_exclusiveShop = exclusiveShop;
|
_exclusiveShop = exclusiveShop;
|
||||||
|
|
||||||
createButtons();
|
createButtons();
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createButtons()
|
private void createButtons()
|
||||||
{
|
{
|
||||||
_toggleHubGames = new IButton()
|
_toggleHubGames = new IButton()
|
||||||
@ -68,7 +68,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
toggleClanTips(player);
|
toggleClanTips(player);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_toggleHubPlayers = new IButton()
|
_toggleHubPlayers = new IButton()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -132,7 +132,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleHubMusic(Player player)
|
private void toggleHubMusic(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).HubMusic = !getPlugin().Get(player).HubMusic;
|
getPlugin().Get(player).HubMusic = !getPlugin().Get(player).HubMusic;
|
||||||
@ -161,35 +161,35 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
_pendingFriendRequestsToggled = !_pendingFriendRequestsToggled;
|
_pendingFriendRequestsToggled = !_pendingFriendRequestsToggled;
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void togglePrivateChat(Player player)
|
private void togglePrivateChat(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).PrivateMessaging = !getPlugin().Get(player).PrivateMessaging;
|
getPlugin().Get(player).PrivateMessaging = !getPlugin().Get(player).PrivateMessaging;
|
||||||
_hubPrivateChatToggled = !_hubPrivateChatToggled;
|
_hubPrivateChatToggled = !_hubPrivateChatToggled;
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleChat(Player player)
|
private void toggleChat(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).ShowChat = !getPlugin().Get(player).ShowChat;
|
getPlugin().Get(player).ShowChat = !getPlugin().Get(player).ShowChat;
|
||||||
_hubChatToggled = !_hubChatToggled;
|
_hubChatToggled = !_hubChatToggled;
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleHubPlayers(Player player)
|
private void toggleHubPlayers(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).ShowPlayers = !getPlugin().Get(player).ShowPlayers;
|
getPlugin().Get(player).ShowPlayers = !getPlugin().Get(player).ShowPlayers;
|
||||||
_hubPlayersToggled = !_hubPlayersToggled;
|
_hubPlayersToggled = !_hubPlayersToggled;
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleClanTips(Player player)
|
private void toggleClanTips(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).ClanTips = !getPlugin().Get(player).ClanTips;
|
getPlugin().Get(player).ClanTips = !getPlugin().Get(player).ClanTips;
|
||||||
_clanTipsToggled = !_clanTipsToggled;
|
_clanTipsToggled = !_clanTipsToggled;
|
||||||
buildPage();
|
buildPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleHubGames(Player player)
|
private void toggleHubGames(Player player)
|
||||||
{
|
{
|
||||||
getPlugin().Get(player).HubGames = !getPlugin().Get(player).HubGames;
|
getPlugin().Get(player).HubGames = !getPlugin().Get(player).HubGames;
|
||||||
@ -201,14 +201,14 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
public void playerClosed()
|
public void playerClosed()
|
||||||
{
|
{
|
||||||
super.playerClosed();
|
super.playerClosed();
|
||||||
|
|
||||||
System.out.println("Prefs have changed: " + preferencesChanged());
|
System.out.println("Prefs have changed: " + preferencesChanged());
|
||||||
if (preferencesChanged())
|
if (preferencesChanged())
|
||||||
{
|
{
|
||||||
getPlugin().savePreferences(getPlayer());
|
getPlugin().savePreferences(getPlayer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void buildPage()
|
protected void buildPage()
|
||||||
{
|
{
|
||||||
@ -244,16 +244,16 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildPreference(int index, Material material, String name, boolean preference, IButton button)
|
private void buildPreference(int index, Material material, String name, boolean preference, IButton button)
|
||||||
{
|
{
|
||||||
buildPreference(index, material, (byte) 0, name, preference, button);
|
buildPreference(index, material, (byte) 0, name, preference, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildPreference(int index, Material material, byte data, String name, boolean preference, IButton button)
|
private void buildPreference(int index, Material material, byte data, String name, boolean preference, IButton button)
|
||||||
{
|
{
|
||||||
String[] description = new String[] { "" + (preference ? ChatColor.GREEN + "Enabled" : ChatColor.RED + "Disabled"), ChatColor.RED + " ", ChatColor.RESET + "Click to " + (preference ? "Disable" : "Enable") };
|
String[] description = new String[] { "" + (preference ? ChatColor.GREEN + "Enabled" : ChatColor.RED + "Disabled"), ChatColor.RED + " ", ChatColor.RESET + "Click to " + (preference ? "Disable" : "Enable") };
|
||||||
|
|
||||||
addButton(index, new ShopItem(material, data, (preference ? ChatColor.GREEN : ChatColor.RED) + name, description, 1, false, false), button);
|
addButton(index, new ShopItem(material, data, (preference ? ChatColor.GREEN : ChatColor.RED) + name, description, 1, false, false), button);
|
||||||
addButton(index + 9, new ShopItem(Material.INK_SACK, (preference ? (byte) 10 : (byte) 8), (preference ? ChatColor.GREEN : ChatColor.RED) + name, description, 1, false, false), button);
|
addButton(index + 9, new ShopItem(Material.INK_SACK, (preference ? (byte) 10 : (byte) 8), (preference ? ChatColor.GREEN : ChatColor.RED) + name, description, 1, false, false), button);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user