Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17a899407d | ||
|
|
1a194c684d | ||
|
|
93e06e431d | ||
|
|
8fede65b79 | ||
|
|
601d23d5cc | ||
|
|
536bacb96a | ||
|
|
07b4c36490 | ||
|
|
39a86b824e | ||
|
|
204c17affc | ||
|
|
ff92dccf47 | ||
|
|
ec69a4db70 | ||
|
|
c9e0880ce9 |
No files matched your search
@@ -18,7 +18,7 @@ https://github.com/Ben12345rocks/VotingPlugin/blob/master/VotingPlugin/Resources
|
||||
</repository>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.Ben12345rocks</groupId>
|
||||
<groupId>com.github.BenCodez</groupId>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>LATEST</version>
|
||||
<scope>provided</scope>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.bencodez</groupId>
|
||||
<artifactId>votingplugin</artifactId>
|
||||
<version>6.0</version>
|
||||
<artifactId>VotingPlugin</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>VotingPlugin</name>
|
||||
<properties>
|
||||
@@ -106,29 +106,29 @@
|
||||
other plugins -->
|
||||
<relocation>
|
||||
<pattern>com.bencodez.advancedcore</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}.advancedcore</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin.advancedcore</shadedPattern>
|
||||
</relocation>
|
||||
<!-- Lets relocate the shaded API so we dont cause any conflicts with
|
||||
other plugins -->
|
||||
<relocation>
|
||||
<pattern>net.pl3x.bukkit.chatapi</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>me.mrten.mysqlapi</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}.mysqlapi</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin.mysqlapi</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.zaxxer.HikariCP</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}.HikariCP</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin.HikariCP</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.zaxxer.hikari</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}.hikari</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin.hikari</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.slf4j.slf4j-simple</pattern>
|
||||
<shadedPattern>${project.groupId}.${project.artifactId}.slf4j-simple</shadedPattern>
|
||||
<shadedPattern>${project.groupId}.votingplugin.slf4j-simple</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.Ben12345rocks.VotingPlugin.Objects;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.bencodez.votingplugin.user.UserManager;
|
||||
import com.bencodez.votingplugin.user.VotingPluginUser;
|
||||
|
||||
@Deprecated
|
||||
public class User {
|
||||
private VotingPluginUser user;
|
||||
public User(Player p) {
|
||||
user = UserManager.getInstance().getVotingPluginUser(p);
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return user.getPoints();
|
||||
}
|
||||
|
||||
public void setPoints(int points) {
|
||||
user.setPoints(points);
|
||||
}
|
||||
|
||||
public void addPoints(int points) {
|
||||
user.addPoints(points);
|
||||
}
|
||||
|
||||
public void removePoints(int points) {
|
||||
user.removePoints(points);
|
||||
}
|
||||
}
|
||||
@@ -1938,7 +1938,7 @@ public class CommandLoader {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
new VoteURL(plugin, sender, null, true).open();
|
||||
new VoteURL(plugin, sender, null, true).open(GUIMethod.CHAT);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.bencodez.advancedcore.api.gui.GUIHandler;
|
||||
import com.bencodez.advancedcore.api.gui.GUIMethod;
|
||||
@@ -89,7 +87,7 @@ public class VoteToday extends GUIHandler {
|
||||
msg = StringParser.getInstance().replacePlaceHolder(msg, placeholders);
|
||||
ItemBuilder item = null;
|
||||
if (plugin.getGui().isChestVoteTodayUseSkull() && !NMSManager.getInstance().isVersion("1.12")) {
|
||||
item = new ItemBuilder(new ItemStack(Material.PLAYER_HEAD, 1)).setSkullOwner(player);
|
||||
item = new ItemBuilder(user.getPlayerHead());
|
||||
} else {
|
||||
item = new ItemBuilder(plugin.getGui().getChestVoteTodayPlayerItem());
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class VoteURL extends GUIHandler {
|
||||
if (user == null && player instanceof Player) {
|
||||
this.user = UserManager.getInstance().getVotingPluginUser((Player) player);
|
||||
}
|
||||
if (player.getName().equals(user.getPlayerName())) {
|
||||
if (player != null && user != null && player.getName().equals(user.getPlayerName())) {
|
||||
if (plugin.getConfigFile().isUsePrimaryAccountForPlaceholders() && user.hasPrimaryAccount()) {
|
||||
user = UserManager.getInstance().getVotingPluginUser(user.getPrimaryAccount());
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class BungeeSettings extends YMLFile {
|
||||
|
||||
@ConfigDataString(path = "BungeeMethod")
|
||||
@Getter
|
||||
private String bungeeMethod = "SOCKETS";
|
||||
private String bungeeMethod = "PLUGINMESSAGING";
|
||||
|
||||
@ConfigDataString(path = "BungeeServer.Host")
|
||||
@Getter
|
||||
|
||||
@@ -640,7 +640,7 @@ public class Config extends YMLFile {
|
||||
}
|
||||
|
||||
public boolean getLoadTopVoterDaily() {
|
||||
return getData().getBoolean("LoadTopVoter.Daily");
|
||||
return getData().getBoolean("LoadTopVoter.Daily", false);
|
||||
}
|
||||
|
||||
public boolean getLoadTopVoterMonthly() {
|
||||
@@ -648,7 +648,7 @@ public class Config extends YMLFile {
|
||||
}
|
||||
|
||||
public boolean getLoadTopVoterWeekly() {
|
||||
return getData().getBoolean("LoadTopVoter.Weekly");
|
||||
return getData().getBoolean("LoadTopVoter.Weekly", false);
|
||||
}
|
||||
|
||||
public int getPointsOnVote() {
|
||||
|
||||
@@ -60,7 +60,7 @@ public enum TopVoter {
|
||||
if (next > list.size() - 1) {
|
||||
next = 0;
|
||||
}
|
||||
return TopVoter.values()[next];
|
||||
return list.get(next);
|
||||
}
|
||||
}
|
||||
return TopVoter.AllTime;
|
||||
@@ -86,7 +86,7 @@ public enum TopVoter {
|
||||
if (prev < 0) {
|
||||
prev = list.size() - 1;
|
||||
}
|
||||
return TopVoter.values()[prev];
|
||||
return list.get(prev);
|
||||
}
|
||||
}
|
||||
return TopVoter.AllTime;
|
||||
|
||||
Reference in new issue
Block a user