Skip to content

Commit

Permalink
Use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Nov 4, 2024
1 parent ed1a0c0 commit 903a723
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
import com.bencodez.advancedcore.api.rewards.injectedrequirement.RequirementInjectConfigurationSection;
import com.bencodez.advancedcore.api.user.AdvancedCoreUser;
import com.bencodez.advancedcore.api.user.userstorage.Column;
import com.bencodez.advancedcore.api.yml.YMLConfig;
import com.bencodez.advancedcore.logger.Logger;
import com.bencodez.simpleapi.file.YMLConfig;
import com.bencodez.simpleapi.nms.NMSManager;
import com.bencodez.simpleapi.updater.Updater;
import com.bencodez.votingplugin.broadcast.BroadcastHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.bencodez.votingplugin.commands;

import java.io.IOException;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map.Entry;
Expand Down Expand Up @@ -39,7 +37,6 @@
import com.bencodez.advancedcore.api.valuerequest.listeners.BooleanListener;
import com.bencodez.advancedcore.api.valuerequest.listeners.StringListener;
import com.bencodez.advancedcore.api.yml.editor.ConfigEditor;
import com.bencodez.advancedcore.api.yml.updater.ConfigUpdater;
import com.bencodez.advancedcore.command.gui.UserGUI;
import com.bencodez.simpleapi.array.ArrayUtils;
import com.bencodez.simpleapi.command.TabCompleteHandle;
Expand Down Expand Up @@ -1288,24 +1285,6 @@ public void execute(CommandSender sender, String[] args) {
}
});

plugin.getAdminVoteCommand()
.add(new CommandHandler(plugin, new String[] { "Config", "Update" },
"VotingPlugin.Commands.AdminVote.Config.Edit|" + adminPerm,
"Force update Config.yml with new options") {

@Override
public void execute(CommandSender sender, String[] args) {
try {
ConfigUpdater.update(plugin, "Config.yml", plugin.getConfigFile().getdFile(), Arrays
.asList("VoteReminding", "MySQL", "CustomCommands", "CustomPlaceholderReturns"));
plugin.getConfigFile().reloadData();
} catch (IOException e) {
e.printStackTrace();
}
sendMessage(sender, "&aUpdated config");
}
});

plugin.getAdminVoteCommand()
.add(new CommandHandler(plugin, new String[] { "VoteSite", "(sitename)", "SetServiceSite", "(string)" },
"VotingPlugin.Commands.AdminVote.VoteSite.Edit|" + adminPerm, "Set VoteSite SerivceSite") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.io.File;
import java.util.ArrayList;

import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.file.annotation.AnnotationHandler;
import com.bencodez.simpleapi.file.annotation.ConfigDataBoolean;
import com.bencodez.simpleapi.file.annotation.ConfigDataInt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import org.bukkit.configuration.ConfigurationSection;

import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.array.ArrayUtils;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.file.annotation.AnnotationHandler;
import com.bencodez.simpleapi.file.annotation.ConfigDataBoolean;
import com.bencodez.simpleapi.file.annotation.ConfigDataInt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.bukkit.entity.Player;

import com.bencodez.advancedcore.api.rewards.DirectlyDefinedReward;
import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.array.ArrayUtils;
import com.bencodez.simpleapi.messages.MessageAPI;
import com.bencodez.votingplugin.VotingPluginMain;
Expand Down
2 changes: 1 addition & 1 deletion VotingPlugin/src/com/bencodez/votingplugin/config/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import org.bukkit.configuration.ConfigurationSection;

import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.array.ArrayUtils;
import com.bencodez.simpleapi.file.annotation.AnnotationHandler;
import com.bencodez.simpleapi.file.annotation.ConfigDataBoolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import org.bukkit.configuration.ConfigurationSection;

import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.file.annotation.AnnotationHandler;
import com.bencodez.simpleapi.file.annotation.ConfigDataBoolean;
import com.bencodez.simpleapi.file.annotation.ConfigDataConfigurationSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.List;
import java.util.Set;

import com.bencodez.advancedcore.api.yml.YMLFile;
import com.bencodez.simpleapi.file.YMLFile;
import com.bencodez.simpleapi.file.annotation.AnnotationHandler;
import com.bencodez.simpleapi.file.annotation.ConfigDataBoolean;
import com.bencodez.simpleapi.file.annotation.ConfigDataDouble;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import com.bencodez.advancedcore.api.user.UserStorage;
import com.bencodez.advancedcore.api.user.userstorage.Column;
import com.bencodez.advancedcore.api.user.userstorage.DataType;
import com.bencodez.advancedcore.api.yml.YMLFileHandler;
import com.bencodez.simpleapi.array.ArrayUtils;
import com.bencodez.simpleapi.file.YMLFileHandler;
import com.bencodez.simpleapi.messages.MessageAPI;
import com.bencodez.votingplugin.VotingPluginMain;
import com.bencodez.votingplugin.user.VotingPluginUser;
Expand Down

0 comments on commit 903a723

Please sign in to comment.