fixed clans tips preferences, and changed World Event commands perms from being ALL to EVENT
This commit is contained in:
parent
58ed9e586c
commit
a551e89310
@ -61,6 +61,7 @@ public class PreferencesRepository extends RepositoryBase
|
||||
preparedStatement.setBoolean(11, entry.getValue().PendingFriendRequests);
|
||||
preparedStatement.setBoolean(12, entry.getValue().friendDisplayInventoryUI);
|
||||
preparedStatement.setBoolean(13, entry.getValue().ClanTips);
|
||||
System.out.println(">> " + entry.getValue().ClanTips);
|
||||
preparedStatement.setString(14, entry.getKey());
|
||||
|
||||
preparedStatement.addBatch();
|
||||
@ -88,6 +89,7 @@ public class PreferencesRepository extends RepositoryBase
|
||||
preparedStatement.setBoolean(11, entry.getValue().PendingFriendRequests);
|
||||
preparedStatement.setBoolean(12, entry.getValue().friendDisplayInventoryUI);
|
||||
preparedStatement.setBoolean(13, entry.getValue().ClanTips);
|
||||
System.out.println(">> " + entry.getValue().ClanTips);
|
||||
preparedStatement.setString(14, entry.getKey());
|
||||
preparedStatement.execute();
|
||||
}
|
||||
@ -120,6 +122,7 @@ public class PreferencesRepository extends RepositoryBase
|
||||
preferences.PendingFriendRequests = resultSet.getBoolean(11);
|
||||
preferences.friendDisplayInventoryUI = resultSet.getBoolean(12);
|
||||
preferences.ClanTips = resultSet.getBoolean(13);
|
||||
System.out.println("<< " + resultSet.getBoolean(13));
|
||||
}
|
||||
|
||||
return preferences;
|
||||
|
@ -15,6 +15,5 @@ public class UserPreferences
|
||||
public boolean IgnoreVelocity = false;
|
||||
public boolean PendingFriendRequests = true;
|
||||
public boolean friendDisplayInventoryUI = true;
|
||||
|
||||
public boolean ClanTips = true;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleClansTips(player);
|
||||
toggleClanTips(player);
|
||||
}
|
||||
};
|
||||
|
||||
@ -111,49 +111,49 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
||||
};
|
||||
}
|
||||
|
||||
private void toggleHubPartyRequests(org.bukkit.entity.Player player)
|
||||
private void toggleHubPartyRequests(Player player)
|
||||
{
|
||||
getPlugin().Get(player).PartyRequests = !getPlugin().Get(player).PartyRequests;
|
||||
_hubPartyRequestsToggled = !_hubPartyRequestsToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void togglePendingFriendRequests(org.bukkit.entity.Player player)
|
||||
private void togglePendingFriendRequests(Player player)
|
||||
{
|
||||
getPlugin().Get(player).PendingFriendRequests = !getPlugin().Get(player).PendingFriendRequests;
|
||||
_pendingFriendRequestsToggled = !_pendingFriendRequestsToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void togglePrivateChat(org.bukkit.entity.Player player)
|
||||
private void togglePrivateChat(Player player)
|
||||
{
|
||||
getPlugin().Get(player).PrivateMessaging = !getPlugin().Get(player).PrivateMessaging;
|
||||
_hubPrivateChatToggled = !_hubPrivateChatToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void toggleChat(org.bukkit.entity.Player player)
|
||||
private void toggleChat(Player player)
|
||||
{
|
||||
getPlugin().Get(player).ShowChat = !getPlugin().Get(player).ShowChat;
|
||||
_hubChatToggled = !_hubChatToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void toggleHubPlayers(org.bukkit.entity.Player player)
|
||||
private void toggleHubPlayers(Player player)
|
||||
{
|
||||
getPlugin().Get(player).ShowPlayers = !getPlugin().Get(player).ShowPlayers;
|
||||
_hubPlayersToggled = !_hubPlayersToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void toggleClansTips(org.bukkit.entity.Player player)
|
||||
private void toggleClanTips(Player player)
|
||||
{
|
||||
getPlugin().Get(player).ClanTips = !getPlugin().Get(player).ClanTips;
|
||||
_clanTipsToggled = !_clanTipsToggled;
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void toggleHubGames(org.bukkit.entity.Player player)
|
||||
private void toggleHubGames(Player player)
|
||||
{
|
||||
getPlugin().Get(player).HubGames = !getPlugin().Get(player).HubGames;
|
||||
_hubGamesToggled = !_hubGamesToggled;
|
||||
@ -164,6 +164,8 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
||||
public void playerClosed()
|
||||
{
|
||||
super.playerClosed();
|
||||
|
||||
System.out.println("Prefs have changed: " + preferencesChanged());
|
||||
if (preferencesChanged())
|
||||
{
|
||||
getPlugin().savePreferences(getPlayer());
|
||||
@ -217,6 +219,6 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
|
||||
|
||||
public boolean preferencesChanged()
|
||||
{
|
||||
return _hubGamesToggled || _hubPlayersToggled || _hubChatToggled || _hubPrivateChatToggled || _hubPartyRequestsToggled || _pendingFriendRequestsToggled;
|
||||
return _hubGamesToggled || _hubPlayersToggled || _hubChatToggled || _hubPrivateChatToggled || _hubPartyRequestsToggled || _pendingFriendRequestsToggled || _clanTipsToggled;
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ public class ClearCommand extends CommandBase<WorldEventManager>
|
||||
{
|
||||
public ClearCommand(WorldEventManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ALL, "clear");
|
||||
super(plugin, Rank.EVENT, "clear");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -14,7 +14,7 @@ public class StartCommand extends CommandBase<WorldEventManager>
|
||||
{
|
||||
public StartCommand(WorldEventManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ALL, "start", "create");
|
||||
super(plugin, Rank.EVENT, "start", "create");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,7 +10,7 @@ public class WorldEventCommand extends MultiCommandBase<WorldEventManager>
|
||||
{
|
||||
public WorldEventCommand(WorldEventManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ALL, "worldevent", "we", "event");
|
||||
super(plugin, Rank.EVENT, "worldevent", "we", "event");
|
||||
|
||||
AddCommand(new StartCommand(Plugin));
|
||||
AddCommand(new ClearCommand(Plugin));
|
||||
|
Loading…
Reference in New Issue
Block a user