Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
/MyMapPublic archive

Commit21b7415

Browse files
committed
updated package name, fixed some small bugs(excluded chunk bugs), use maven repository instead of local library, updated to v1.3.2
1 parent1d1cf05 commit21b7415

30 files changed

+112
-124
lines changed

‎lib/nukkit-1.0-SNAPSHOT-sources.jar

-1.13 MB
Binary file not shown.

‎lib/nukkit-1.0-SNAPSHOT.jar

15.4 MB
Binary file not shown.

‎pom.xml

Lines changed: 23 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>com.him188</groupId>
7+
<groupId>moe.him188</groupId>
88
<artifactId>mymap</artifactId>
99
<name>MyMap</name>
10-
<version>1.3.1</version>
10+
<version>1.3.2</version>
1111

1212

1313
<properties>
@@ -16,13 +16,29 @@
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
</properties>
1818

19+
<repositories>
20+
<repository>
21+
<id>him188-nukkit</id>
22+
<url>http://repo.him188.moe:8081/repository/nukkit/</url>
23+
</repository>
24+
</repositories>
25+
26+
<distributionManagement>
27+
<repository>
28+
<id>releases</id>
29+
<url>http://repo.him188.moe:8081/repository/mymap/</url>
30+
</repository>
31+
<snapshotRepository>
32+
<id>Snapshots</id>
33+
<url>http://repo.him188.moe:8081/repository/mymap/</url>
34+
</snapshotRepository>
35+
</distributionManagement>
36+
1937
<dependencies>
2038
<dependency>
2139
<groupId>cn.nukkit</groupId>
2240
<artifactId>nukkit</artifactId>
2341
<version>1.0-SNAPSHOT</version>
24-
<scope>system</scope>
25-
<systemPath>${project.basedir}/lib/nukkit-1.0-SNAPSHOT.jar</systemPath>
2642
</dependency>
2743
</dependencies>
2844

@@ -47,53 +63,14 @@
4763
<plugins>
4864
<plugin>
4965
<groupId>org.apache.maven.plugins</groupId>
50-
<artifactId>maven-install-plugin</artifactId>
51-
<version>2.5.2</version>
52-
<executions>
53-
<execution>
54-
<id>install-external</id>
55-
<phase>clean</phase>
56-
<configuration>
57-
<repositoryLayout>default</repositoryLayout>
58-
<version>0.8</version>
59-
<packaging>jar</packaging>
60-
<generatePom>true</generatePom>
61-
</configuration>
62-
<goals></goals>
63-
</execution>
64-
</executions>
66+
<artifactId>maven-jar-plugin</artifactId>
67+
<version>3.0.2</version>
6568
</plugin>
6669

6770
<plugin>
6871
<groupId>org.apache.maven.plugins</groupId>
69-
<artifactId>maven-surefire-plugin</artifactId>
70-
<configuration>
71-
<skip>true</skip>
72-
</configuration>
73-
</plugin>
74-
75-
<plugin>
76-
<groupId>org.apache.maven.plugins</groupId>
77-
<artifactId>maven-enforcer-plugin</artifactId>
78-
<version>1.4.1</version>
79-
<executions>
80-
<execution>
81-
<id>enforce</id>
82-
<configuration>
83-
<rules>
84-
<DependencyConvergence/>
85-
</rules>
86-
</configuration>
87-
<goals>
88-
<goal>enforce</goal>
89-
</goals>
90-
</execution>
91-
</executions>
92-
</plugin>
93-
94-
<plugin>
9572
<artifactId>maven-source-plugin</artifactId>
96-
<version>2.1</version>
73+
<version>3.0.1</version>
9774
<configuration>
9875
<attach>true</attach>
9976
</configuration>

‎src/main/java/com/him188/mymap/CommonListener.javarenamed to ‎src/main/java/moe/him188/mymap/CommonListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.Player;
44
importcn.nukkit.Server;

‎src/main/java/com/him188/mymap/FrameProtectionListener.javarenamed to ‎src/main/java/moe/him188/mymap/FrameProtectionListener.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.event.EventHandler;
44
importcn.nukkit.event.EventPriority;
@@ -25,6 +25,7 @@ public void onInteract(PlayerInteractEvent event) {
2525
for (MyMapFrameframe :plugin.getList()) {
2626
if (frame.inRange(event.getBlock())) {
2727
event.setCancelled();
28+
return;
2829
}
2930
}
3031
}
@@ -37,6 +38,7 @@ public void onDrop(ItemFrameDropItemEvent event) {
3738
event.getPlayer().sendTip("ID: " +frame.getId());
3839
}
3940
event.setCancelled();
41+
return;
4042
}
4143
}
4244
}
@@ -46,6 +48,7 @@ public void onBreak(BlockBreakEvent event) {
4648
for (MyMapFrameframe :plugin.getList()) {
4749
if (frame.inRange(event.getBlock())) {
4850
event.setCancelled();
51+
return;
4952
}
5053
}
5154
}
@@ -55,6 +58,7 @@ public void onUpdate(BlockUpdateEvent event) {
5558
for (MyMapFrameframe :plugin.getList()) {
5659
if (frame.inRange(event.getBlock())) {
5760
event.setCancelled();
61+
return;
5862
}
5963
}
6064
}

‎src/main/java/com/him188/mymap/MainCommand.javarenamed to ‎src/main/java/moe/him188/mymap/MainCommand.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.Player;
44
importcn.nukkit.command.Command;
55
importcn.nukkit.command.CommandExecutor;
66
importcn.nukkit.command.CommandSender;
77
importcn.nukkit.command.PluginCommand;
8+
importcn.nukkit.command.data.CommandParamType;
89
importcn.nukkit.command.data.CommandParameter;
9-
importcom.him188.mymap.utils.Utils;
10+
importmoe.him188.mymap.utils.Utils;
1011

1112
importjava.io.File;
1213
importjava.io.IOException;
1314
importjava.util.HashMap;
1415

15-
importstaticcom.him188.mymap.utils.LanguageBase.ID.*;
16-
importstaticcom.him188.mymap.utils.LanguageBase.getMessage;
16+
importstaticmoe.him188.mymap.utils.LanguageBase.ID.*;
17+
importstaticmoe.him188.mymap.utils.LanguageBase.getMessage;
1718

1819
/**
1920
* @author Him188 @ MyMap Project
@@ -25,18 +26,18 @@ public MainCommand(String name, MyMap owner) {
2526
{
2627
put("set",newCommandParameter[]{
2728
newCommandParameter("arg",newString[]{"set","add"}),
28-
newCommandParameter("id",CommandParameter.ARG_TYPE_STRING,false),
29+
newCommandParameter("id",CommandParamType.STRING,false),
2930
});
3031

3132
put("remove",newCommandParameter[]{
3233
newCommandParameter("arg",newString[]{"remove"}),
33-
newCommandParameter("id",CommandParameter.ARG_TYPE_STRING,false),
34+
newCommandParameter("id",CommandParamType.STRING,false),
3435
});
3536

3637
put("set_picture",newCommandParameter[]{
3738
newCommandParameter("arg",newString[]{"setpicture","setimage","sp","si"}),
38-
newCommandParameter("id",CommandParameter.ARG_TYPE_STRING,false),
39-
newCommandParameter("image file",CommandParameter.ARG_TYPE_RAW_TEXT,false),
39+
newCommandParameter("id",CommandParamType.STRING,false),
40+
newCommandParameter("image file",CommandParamType.RAWTEXT,false),
4041
});
4142
}
4243
});
@@ -49,6 +50,10 @@ public MainCommand(String name, MyMap owner) {
4950

5051
@Override
5152
publicbooleanonCommand(CommandSendersender,Commandcommand,Stringlabel,String[]args) {
53+
if (args.length ==0) {
54+
sender.sendMessage("没有参数");
55+
returntrue;
56+
}
5257
Stringarg =args[0].toLowerCase();
5358
if (senderinstanceofPlayer) {
5459
switch (arg) {

‎src/main/java/com/him188/mymap/MyMap.javarenamed to ‎src/main/java/moe/him188/mymap/MyMap.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.Server;
44
importcn.nukkit.permission.Permission;
55
importcn.nukkit.plugin.PluginBase;
66
importcn.nukkit.utils.Config;
7-
importcom.him188.mymap.event.FrameAddEvent;
8-
importcom.him188.mymap.event.FrameRemoveEvent;
9-
importcom.him188.mymap.utils.FrameList;
10-
importcom.him188.mymap.utils.LanguageBase;
11-
importcom.him188.mymap.utils.Utils;
7+
importmoe.him188.mymap.event.FrameAddEvent;
8+
importmoe.him188.mymap.event.FrameRemoveEvent;
9+
importmoe.him188.mymap.utils.FrameList;
10+
importmoe.him188.mymap.utils.LanguageBase;
11+
importmoe.him188.mymap.utils.Utils;
1212

1313
importjava.io.File;
1414
importjava.io.IOException;
@@ -119,6 +119,7 @@ public void onEnable() {
119119
@Override
120120
publicvoidonDisable() {
121121
SettingListener.clearSettingDataMap();
122+
// TODO: 2018/7/23 0023 在地图中删除掉展示框里面的图片数据, 否则可能导致区块爆炸
122123
}
123124

124125
publicFrameListgetList() {

‎src/main/java/com/him188/mymap/MyMapFrame.javarenamed to ‎src/main/java/moe/him188/mymap/MyMapFrame.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.Server;
44
importcn.nukkit.block.BlockAir;
@@ -10,11 +10,11 @@
1010
importcn.nukkit.math.Vector3;
1111
importcn.nukkit.utils.Config;
1212
importcn.nukkit.utils.ConfigSection;
13-
importcom.him188.mymap.event.FrameImageChangeEvent;
14-
importcom.him188.mymap.executable.AsyncImageUpdateTask;
15-
importcom.him188.mymap.image.ImageUpdater;
16-
importcom.him188.mymap.utils.LanguageBase;
17-
importcom.him188.mymap.utils.Utils;
13+
importmoe.him188.mymap.event.FrameImageChangeEvent;
14+
importmoe.him188.mymap.executable.AsyncImageUpdateTask;
15+
importmoe.him188.mymap.image.ImageUpdater;
16+
importmoe.him188.mymap.utils.LanguageBase;
17+
importmoe.him188.mymap.utils.Utils;
1818

1919
importjava.io.File;
2020
importjava.io.IOException;
@@ -59,7 +59,7 @@ public MyMapFrame(String id, Vector3 startPos, Vector3 endPos, Level level, Bloc
5959
this.face =face;
6060
Utils.analyzeVector3(this.startPos,this.endPos,this.getFace());
6161
this.imageFile =imageFile ==null ?DEFAULT_IMAGE_FILE :Utils.detectImageFile(imageFile.getPath());
62-
62+
// TODO: 2018/7/23 0023 使用相对 plugin data folder 的 imageFile, 而不是绝对路径
6363
this.level =level;
6464
initImageUpdater();
6565
this.configFile =newFile(MyMapFrame.FRAME_DATA_FOLDER,this.getId() +".yml");
@@ -201,7 +201,7 @@ public void clear() {
201201
for (intz =0;z <=subtract.getZ();z++) {
202202
Vector3pos =min.add(x,y,z);
203203
BlockEntityblockEntity =this.level.getBlockEntity(pos);
204-
if (blockEntity!=null &&blockEntityinstanceofBlockEntityItemFrame) {
204+
if (blockEntityinstanceofBlockEntityItemFrame) {
205205
((BlockEntityItemFrame)blockEntity).setItem(newItemBlock(newBlockAir()));
206206
}
207207
this.level.setBlock(pos,newBlockAir(),true,false);

‎src/main/java/com/him188/mymap/SettingListener.javarenamed to ‎src/main/java/moe/him188/mymap/SettingListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagecom.him188.mymap;
1+
packagemoe.him188.mymap;
22

33
importcn.nukkit.Player;
44
importcn.nukkit.event.EventHandler;
@@ -14,8 +14,8 @@
1414
importjava.util.Map;
1515
importjava.util.UUID;
1616

17-
importstaticcom.him188.mymap.utils.LanguageBase.ID.*;
18-
importstaticcom.him188.mymap.utils.LanguageBase.getMessage;
17+
importstaticmoe.him188.mymap.utils.LanguageBase.ID.*;
18+
importstaticmoe.him188.mymap.utils.LanguageBase.getMessage;
1919

2020
/**
2121
* 用于设置画框的事件监听器

‎src/main/java/com/him188/mymap/adapter/CropImageAdapter.javarenamed to ‎src/main/java/moe/him188/mymap/adapter/CropImageAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagecom.him188.mymap.adapter;
1+
packagemoe.him188.mymap.adapter;
22

33
importjava.awt.*;
44
importjava.awt.image.BufferedImage;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp