VoteSQL [需要 Votifier!]
版本:1.4
CraftBukkit 1.5.1-R0.2
此插件将玩家投票记录到 MySQL 表或扁平文件中!顺便你还可以添加带有颜色的自定义消息,用于在玩家投票时显示!此外,它还会以数字形式记录他们的投票次数。这可以用来设置一个统计 PHP 页面之类的东西 :).
视频
即将推出!
功能
- 将投票记录到 SQL 表中
- 配置文件
- 支持 SuperPerms
- 包含 Plugin Metrics
- 现在支持使用扁平文件进行日志记录!
- 可以创建带有颜色等效果的自定义消息!
- 投票后给予金钱奖励!
演示
配置文件
# 感谢选择 VoteSQL!只需更改以下信息。第一次投票时的 FlatFileListener 可能无法记录该投票!
VoteSQL:
onVote:
Enabled: false
# %P = 玩家名称 %S = 他们投票的网站!
消息:'&2感谢你为%P从%S投票!'
MySQL:
已启用:false
服务器:服务器地址例如.本地主机
数据库:在此处填写数据库名称
用户:在此处填写MySQL数据库的用户名
密码:在此处填写用户密码
表前缀:votesql
FlatFile:
启用: false
货币:
启用: false
金额: 150
# %P = 玩家名称 %M = 获得的金钱
Message: '&2%P, 你获得了%M 美元!'
如果某些配置选项没有显示,请删除配置文件并重启服务器!
命令
- /votesql - 显示帮助页面
- /votesql reload - 重新加载配置。
- /votesql check <string> - 以1票的票数添加到数据库
- /votesql top - 显示前5名投票者。
权限
- votesql.reload
- votesql.check
- votesql.top
计划中
- 用户建议。
- 添加自动更新选项!
- 在游戏中添加排行榜命令(前5名玩家等!数量可配置)!查看您的个人排名以及您的投票数量!
添加Vault支持以便他们可以接收金钱!
- 投票时给予物品
更新日志
要查看更新日志,请前往文件标签页并点击版本号以阅读相关信息!
源代码
指标

错误
发现任何问题?请提交工单并在Gist中发布错误信息!
Gist链接:
PHP代码
<?PHP
$user_name = "USERHERE";
$password = "PASSWORDHERE";
$database = "DATABASEHERE";
$server = "SERVERIPHERE";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT * FROM votesql ORDER BY votes DESC";
$result = mysql_query($SQL);
$value = 1;
while ($db_field = mysql_fetch_assoc($result)) {
print "<tr>";
print "<td>" . $value . "</td>";
print "<td>" . $db_field['playername'] . "</td>";
print "<td>" . $db_field['votes'] . "</td>";
$value = $value + 1;
print "</tr>";
}
mysql_close($db_handle);
}
else {
print "未找到数据库 ";
mysql_close($db_handle);
}
?>
捐赠
非常感谢您的捐赠 :)
VoteSQL [Requires Votifier!]
Version: 1.4
Craft Bukkit 1.5.1-R0.2
This plugin logs player votes to a MySQL table or a Flat-File! While your at it you might as well go ahead and add a custom message with colors for when they vote! Also, it logs the amount of times they vote in numerals. This can be used to set up a stats php page or something :).
Video
Soon!
Features
- Logs votes to a SQL table
- Config
- SuperPerms support
- Plugin Metrics
- Now can log with Flat-File Support!
- Make your own custom messages with colors and such!
- Gives money on vote!
Demo
Config
# Thanks for choosing VoteSQL! Simply change the info below. The FlatFileListener on the first vote may not record it!
VoteSQL:
onVote:
Enabled: false
# %P = Player Name %S = The Site they voted from!
Message: '&2Thank you for voting %P from %S!'
MySQL:
Enabled: false
Server: Server Address eg.Localhost
Database: Place Database name here
User: Place User of MySQL Database here
Password: Place User password here
Table_Prefix: votesql
FlatFile:
Enabled: false
currency:
Enabled: false
Amount: 150
# %P = Player Name %M = Money received.
Message: '&2%P, You received %M dollars!'
If some config options are not coming up delete the config and restart the server!
Commands
- /votesql - Displays help page
- /votesql reload - Reloads config.
- /votesql check <string> - Adds to the database with a vote of 1
- /votesql top - Shows the top 5 voters.
Permissions
- votesql.reload
- votesql.check
- votesql.top
Planned
- User Suggestions.
- Adding the Auto-Updater Option!
- Adding in game commands for leader-boards (Top 5 players and such! Amount will be Configurable)! See your individual placing and also your amount of votes you have!
Adding Vault support so they can receive money!
- Give items on vote
Change Log
To see the change-log go on the files tab and click on the version to read any info on it!
Source
Metrics

Bugs
Find any? Please submit a ticket and post errors in a gist!
Link to gist:
PHP Code
<?PHP
$user_name = "USERHERE";
$password = "PASSWORDHERE";
$database = "DATABASEHERE";
$server = "SERVERIPHERE";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT * FROM votesql ORDER BY votes DESC";
$result = mysql_query($SQL);
$value = 1;
while ($db_field = mysql_fetch_assoc($result)) {
print "<tr>";
print "<td>" . $value . "</td>";
print "<td>" . $db_field['playername'] . "</td>";
print "<td>" . $db_field['votes'] . "</td>";
$value = $value + 1;
print "</tr>";
}
mysql_close($db_handle);
}
else {
print "Database NOT Found ";
mysql_close($db_handle);
}
?>
Donate
Donations are greatly appreciated :)
评论 0
登录后参与评分
还没有评论,来抢沙发吧