Skip to content

Commit

Permalink
1.1: fixed some stuff in hellhounds, idk what else. little bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pirogoeth committed Jun 26, 2012
1 parent b615081 commit 17e37d0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# points:
# list-world-only - whether or not to list points in the current world only, or in all [default: false]

version: 1.0
version: 1.1.0
override: true
debug: false
metrics-enabled: true
Expand All @@ -73,7 +73,7 @@ login-handler: default
whitelist-handler: default
database:
driver: org.sqlite.JDBC
url: jdbc:sqlite:{DIR}{NAME}.db
url: jdbc:sqlite:{DIR}/{NAME}.db
username: captain
password: narwhals
isolation: SERIALIZABLE
Expand Down Expand Up @@ -105,6 +105,4 @@ actions:
golem-cruelty: false
hounds:
attack-delay: 60
removal-delay: 600
points:
list-world-only: false
removal-delay: 600
6 changes: 2 additions & 4 deletions src/data.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# this file is not meant for configuration by the end user, this is meant for storage and usage by the plugin itself
# this file will be gone VERY SOON once I get bans serialised in the database.

ban_storage:
ip: {}
name: {}
whitelist: []
credentials: {}
locations: {}
name: {}
2 changes: 1 addition & 1 deletion src/me/maiome/openauth/actions/Actions.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static void loadMetricsData() {
for (Actions a : Actions.values()) {
try {
Class action = a.getAction();
Tracker metric = action.getField("tracker").get(action);
Tracker metric = (Tracker) action.getField("tracker").get(action);
OpenAuth.getMetrics().addCustomData(metric);
log.exDebug(String.format("Registered Metrics data tracker [%s] from %s.", metric.getColumnName(), action.getCanonicalName()));
} catch (java.lang.Exception e) {
Expand Down
4 changes: 2 additions & 2 deletions src/me/maiome/openauth/actions/HellHounds.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void run() {
world.strikeLightningEffect(block.getLocation());
Wolf w = world.spawn(block.getLocation(), Wolf.class);
spawned.add(w);
w.damage(0, (Entity) target);
w.damage(0, (Entity) target.getPlayer());
w.setNoDamageTicks((int) removal_delay);
w.setFireTicks((int) removal_delay);
w.setAngry(true);
Expand Down Expand Up @@ -184,12 +184,12 @@ public void run(Block block) {}

// player attack method
public void run(OAPlayer player) {
tracker.increment();
if (attacking.contains(player)) {
this.sender.sendMessage(ChatColor.BLUE + String.format("Player %s is already being attacked.", player.getName()));
this.used = false;
return;
}
tracker.increment();
this.target = player;
attacking.add(player);
this.storming = player.getLocation().getWorld().hasStorm();
Expand Down
2 changes: 2 additions & 0 deletions src/me/maiome/openauth/commands/OACommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ public static void wand(CommandContext args, CommandSender sender) throws Comman
@Command(aliases = {"save"}, usage = "", desc = "Saves the data configuration.", max = 0)
@CommandPermissions({ "openauth.admin.save" })
public static void savedata(CommandContext args, CommandSender sender) throws CommandException {
OpenAuth.getOAServer().saveBans(false);
ConfigInventory.DATA.save();
OpenAuth.getOAServer().getWhitelistHandler().saveWhitelist();
sender.sendMessage(ChatColor.GREEN + "OpenAuth data has been saved.");
}

Expand Down

0 comments on commit 17e37d0

Please sign in to comment.