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