1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2024-10-31 22:38:48 +00:00

fix onPlayerMove NullPointerException...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-08-01 17:05:02 +08:00
parent 24127af11f
commit 7dcda9b2d9
3 changed files with 16 additions and 13 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>cn.CityCraft</groupId> <groupId>cn.CityCraft</groupId>
<artifactId>Residence</artifactId> <artifactId>Residence</artifactId>
<version>2.7.0.5-SNAPSHOT</version> <version>2.7.0.6-SNAPSHOT</version>
<name>Residence</name> <name>Residence</name>
<build> <build>
<finalName>${project.name}</finalName> <finalName>${project.name}</finalName>

View File

@ -610,8 +610,11 @@ public class ResidencePlayerListener implements Listener {
Player player = event.getPlayer(); Player player = event.getPlayer();
if (player == null) if (player == null)
return; return;
long last = lastUpdate.get(player.getName());
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
if (!lastUpdate.containsKey(player.getName())) {
lastUpdate.put(player.getName(), now);
}
long last = lastUpdate.get(player.getName());
if (now - last < Residence.getConfigManager().getMinMoveUpdateInterval()) if (now - last < Residence.getConfigManager().getMinMoveUpdateInterval())
return; return;
lastUpdate.put(player.getName(), now); lastUpdate.put(player.getName(), now);

View File

@ -1,6 +1,6 @@
name: Residence name: Residence
main: com.bekvon.bukkit.residence.ResidenceCommandListener main: com.bekvon.bukkit.residence.ResidenceCommandListener
version: 2.7.0.5 version: 2.7.0.6
website: http://ci.citycraft.cn:8800/jenkins/job/Residence-Fix/ website: http://ci.citycraft.cn:8800/jenkins/job/Residence-Fix/
description: Cuboid Residence Plugin description: Cuboid Residence Plugin
authors: [bekvon,nate302,t00thpick1,喵♂呜] authors: [bekvon,nate302,t00thpick1,喵♂呜]