mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
We dont need addBatch?
This commit is contained in:
parent
07b2556592
commit
e890d08ce3
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>Jobs</groupId>
|
||||
<artifactId>jobs</artifactId>
|
||||
<version>4.1.2</version>
|
||||
<version>4.1.3</version>
|
||||
<name>Jobs</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
|
@ -12,6 +12,7 @@ import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.container.ExploreChunk;
|
||||
import com.gamingmesh.jobs.container.ExploreRegion;
|
||||
import com.gamingmesh.jobs.container.ExploreRespond;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
|
||||
public class ExploreManager {
|
||||
|
||||
@ -43,7 +44,7 @@ public class ExploreManager {
|
||||
return;
|
||||
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[Jobs] Loading explorer data");
|
||||
Jobs.getJobsDAO().loadExplore();
|
||||
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[Jobs] Loaded explorer data");
|
||||
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[Jobs] Loaded explorer data (" + getSize() + ")");
|
||||
}
|
||||
|
||||
public HashMap<String, ExploreRegion> getWorlds() {
|
||||
@ -92,26 +93,26 @@ public class ExploreManager {
|
||||
eChunk.setOldChunk();
|
||||
return eChunk.addPlayer(player);
|
||||
}
|
||||
|
||||
public void addChunk(String player, String worldName, int x, int z) {
|
||||
int ChunkX = x;
|
||||
int ChunkZ = z;
|
||||
int RegionX = (int) Math.floor(ChunkX / 32D);
|
||||
int RegionZ = (int) Math.floor(ChunkZ / 32D);
|
||||
if (!worlds.containsKey(worldName)) {
|
||||
ExploreChunk eChunk = new ExploreChunk(player, ChunkX, ChunkZ);
|
||||
eChunk.setOldChunk();
|
||||
ExploreRegion eRegion = new ExploreRegion(RegionX, RegionZ);
|
||||
eRegion.addChunk(eChunk);
|
||||
worlds.put(worldName, eRegion);
|
||||
}
|
||||
ExploreRegion eRegion = worlds.get(worldName);
|
||||
ExploreChunk eChunk = eRegion.getChunk(ChunkX + ":" + ChunkZ);
|
||||
if (eChunk == null) {
|
||||
eChunk = new ExploreChunk(player, ChunkX, ChunkZ);
|
||||
eChunk.setOldChunk();
|
||||
eRegion.addChunk(eChunk);
|
||||
} else
|
||||
eChunk.setOldChunk();
|
||||
}
|
||||
//
|
||||
// public void addChunk(String player, String worldName, int x, int z) {
|
||||
// int ChunkX = x;
|
||||
// int ChunkZ = z;
|
||||
// int RegionX = (int) Math.floor(ChunkX / 32D);
|
||||
// int RegionZ = (int) Math.floor(ChunkZ / 32D);
|
||||
// if (!worlds.containsKey(worldName)) {
|
||||
// ExploreChunk eChunk = new ExploreChunk(player, ChunkX, ChunkZ);
|
||||
// eChunk.setOldChunk();
|
||||
// ExploreRegion eRegion = new ExploreRegion(RegionX, RegionZ);
|
||||
// eRegion.addChunk(eChunk);
|
||||
// worlds.put(worldName, eRegion);
|
||||
// }
|
||||
// ExploreRegion eRegion = worlds.get(worldName);
|
||||
// ExploreChunk eChunk = eRegion.getChunk(ChunkX + ":" + ChunkZ);
|
||||
// if (eChunk == null) {
|
||||
// eChunk = new ExploreChunk(player, ChunkX, ChunkZ);
|
||||
// eChunk.setOldChunk();
|
||||
// eRegion.addChunk(eChunk);
|
||||
// } else
|
||||
// eChunk.setOldChunk();
|
||||
// }
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.gamingmesh.jobs.container;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
|
||||
@ -9,7 +9,7 @@ public class ExploreChunk {
|
||||
|
||||
int x;
|
||||
int z;
|
||||
List<String> playerNames = new ArrayList<String>();
|
||||
Set<String> playerNames = new HashSet<String>();
|
||||
boolean isNewChunk = true;
|
||||
|
||||
public ExploreChunk(String playerName, int x, int z) {
|
||||
@ -45,7 +45,7 @@ public class ExploreChunk {
|
||||
return this.z;
|
||||
}
|
||||
|
||||
public List<String> getPlayers() {
|
||||
public Set<String> getPlayers() {
|
||||
return this.playerNames;
|
||||
}
|
||||
|
||||
|
@ -1522,7 +1522,7 @@ public abstract class JobsDAO {
|
||||
prest1.setInt(6, log.getDate());
|
||||
prest1.setString(7, log.getActionType());
|
||||
prest1.setString(8, one.getKey());
|
||||
prest1.addBatch();
|
||||
// prest1.addBatch();
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
@ -1548,7 +1548,7 @@ public abstract class JobsDAO {
|
||||
prest2.setDouble(6, one.getValue().get(CurrencyType.MONEY));
|
||||
prest2.setDouble(7, one.getValue().get(CurrencyType.EXP));
|
||||
prest2.setDouble(8, one.getValue().get(CurrencyType.POINTS));
|
||||
prest2.addBatch();
|
||||
// prest2.addBatch();
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Jobs
|
||||
description: Jobs Plugin for the BukkitAPI
|
||||
main: com.gamingmesh.jobs.Jobs
|
||||
version: 4.1.2
|
||||
version: 4.1.3
|
||||
website: https://www.spigotmc.org/resources/jobs-reborn.4216/
|
||||
author: phrstbrn
|
||||
softdepend: [Vault, iConomy, MythicMobs, McMMO, WorldGuard, MyPet]
|
||||
|
Loading…
Reference in New Issue
Block a user